Ayush Gupta has Published 541 Articles

Convex Hull Jarvis’s Algorithm or Wrapping in C++

Ayush Gupta

Ayush Gupta

Updated on 29-Jan-2020 07:37:54

513 Views

In this tutorial, we will be discussing a program to find the convex hull of a given set of points using Jarvis’s Algorithm.Convex hull is the smallest polygon convex figure containing all the given points either on the boundary on inside the figure.In Jarvis’s algorithm, we select the leftmost point ... Read More

Converting seconds into days, hours, minutes and seconds in C++

Ayush Gupta

Ayush Gupta

Updated on 29-Jan-2020 07:35:56

981 Views

In this tutorial, we will be discussing a program to convert seconds into days, hours, minutes and seconds.For this we will be provided with a random number of seconds. Our task is to convert it into proper number of days, hours, minutes and seconds respectively.Example Live Demo#include using namespace std; ... Read More

Coordinates of rectangle with given points lie inside in C++

Ayush Gupta

Ayush Gupta

Updated on 29-Jan-2020 07:30:11

180 Views

In this tutorial, we will be discussing a program to find the coordinates of rectanglewith given points lying inside.For this we will be provided with some coordinate points. Our task is to find the smallest rectangle such that all the points lie inside it and it should have its sides ... Read More

Convex Hull using Divide and Conquer Algorithm in C++

Ayush Gupta

Ayush Gupta

Updated on 29-Jan-2020 07:28:58

741 Views

In this tutorial, we will be discussing a program to find the convex hull of a given set of points.Convex hull is the smallest polygon convex figure containing all the given points either on the boundary on inside the figure.In this program, we will use brute force to divide the ... Read More

Convex Hull Monotone chain algorithm in C++

Ayush Gupta

Ayush Gupta

Updated on 29-Jan-2020 07:23:54

137 Views

In this tutorial, we will be discussing a program to find the convex hull of a given set of points.Convex hull is the smallest polygon convex figure containing all the given points either on the boundary on inside the figure.Example Live Demo#include #define llu long long int using namespace std; ... Read More

Convex Hull Graham Scan in C++

Ayush Gupta

Ayush Gupta

Updated on 29-Jan-2020 07:21:35

683 Views

In this tutorial, we will be discussing a program to find the convex hull of a given set of points.Convex hull is the smallest polygon convex figure containing all the given points either on the boundary on inside the figure.In Graham Scan, firstly the pointes are sorted to get to ... Read More

Copy set bits in a range in C++

Ayush Gupta

Ayush Gupta

Updated on 29-Jan-2020 07:18:33

373 Views

In this tutorial, we will be discussing a program to copy set bits of one number to another in the given range.For this we will be provided with two integers. Our task is to see the bits in the first number and set those bits in the second number as ... Read More

Convert time from 24 hour clock to 12 hour clock format in C++

Ayush Gupta

Ayush Gupta

Updated on 22-Jan-2020 07:49:52

688 Views

In this tutorial, we will be discussing a program to convert time from 24 hour clock to 12 hour clock format.For this we will be provided with certain time in 24 hour format. Our task is to convert it into 12 hour format with the extension of “AM” or “PM”.Example Live ... Read More

Convert the undirected graph into directed graph such that there is no path of length greater than 1 in C++

Ayush Gupta

Ayush Gupta

Updated on 22-Jan-2020 07:45:37

137 Views

In this tutorial, we will be discussing a program to convert the undirected graph into a directed graph such that there is no path of length greater than 1.For this we will be provided with an undirected graph. Our task is to convert that graph into a direct one given ... Read More

Convert the string into palindrome string by changing only one character in C++

Ayush Gupta

Ayush Gupta

Updated on 22-Jan-2020 07:42:15

287 Views

In this tutorial, we will be discussing a program to convert the string into palindrome string by changing only one character.For this we will be provided with a string. Our task is to convert the given string into a palindrome by changing only one character.Example Live Demo#include using namespace std; //checking ... Read More

Advertisements