# Category Archives: Geometric

Given starting and ending positions of segments on a line, the task is to take the union of all given segments and find length covered… Read More
Given N point on a 2D plane as pair of (x, y) co-ordinates, we need to find maximum number of point which lie on the… Read More
Consider a circle with n points on circumference of it where n is even. Count number of ways we can connect these points such that… Read More
Given ordered coordinates of a polygon with n vertices. Find the area of the polygon. Here ordered means that the coordinates are given either in… Read More
Given two points p (x1, y1) and q (x2, y2), calculate the number of integral points lying on the line joining them. Example: If points… Read More
Given three non-collinear integral points in XY plane, find the number of integral points inside the triangle formed by the three points. (A point in… Read More
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