Skip to content

Category Archives: Geometric

Given three points p1, p2 and p3, the task is to determine the orientation of these three points. Orientation of an ordered triplet of points… Read More
Given a set of points, connect the dots without crossing.   Example:  Input: points[] = {(0, 3), (1, 1), (2, 2), (4, 4), (0, 0), (1,… Read More
Given coordinates of four points in a plane, find if the four points form a square or not.  To check for square, we need to… Read More
A triangulation of a convex polygon is formed by drawing diagonals between non-adjacent vertices (corners) such that the diagonals never intersect. The problem is to… Read More
Given the radius of a circle, find the area of that circle. The area of a circle can simply be evaluated using the following formula. … Read More
Given the sides of a triangle, the task is to find the area of this triangle. Examples :  Input : a = 5, b =… Read More
Given two rectangles, find if the given two rectangles overlap or not.Note that a rectangle can be represented by two coordinates, top left and bottom… Read More
We are given an array of n points in the plane, and the problem is to find out the closest pair of points in the… Read More
Given n line segments (p1, q1), (p2, q2), … (pn, qn), find if the given line segments intersect with each other or not. Example: Input:… Read More
Given a set of points in the plane. the convex hull of the set is the smallest convex polygon that contains all the points of… Read More
Given a set of points in the plane. the convex hull of the set is the smallest convex polygon that contains all the points of… Read More
Given a polygon and a point ‘p’, find if ‘p’ lies inside the polygon or not. The points lying on the border are considered inside.… Read More
Given two line segments (p1, q1) and (p2, q2), find if the given line segments intersect with each other.Before we discuss the solution, let us… Read More
We are given an array of n points in the plane, and the problem is to find out the closest pair of points in the… Read More
Given three corner points of a triangle, and one more point P. Write a function to check whether P lies within the triangle or not.… Read More

Start Your Coding Journey Now!