##
Classify a triangle
November 10, 2016

We are given co-ordinates of a triangle. The task is to classify this triangle on basis of sides and angle. Examples: Input : p1 =… Read More »

November 10, 2016

We are given co-ordinates of a triangle. The task is to classify this triangle on basis of sides and angle. Examples: Input : p1 =… Read More »

October 28, 2016

Given a set of points as and a line as ax+by+c = 0. We need to find a point on given line for which sum… Read More »

October 10, 2016

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 »

October 4, 2016

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 »

September 14, 2016

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 »

March 16, 2016

Given ordered coordinates of a polygon with n vertices. Find area of the polygon. Here ordered mean that the coordinates are given either in clockwise… Read More »

February 24, 2016

Given two points p (x1, y1) and q (x2, y2), calculate the number of integral points lying on the line joining them. Example : If… Read More »

January 22, 2016

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 »

November 28, 2015

Orientation of an ordered triplet of points in the plane can be counterclockwise clockwise colinear The following diagram shows different possible orientations of (a, b,… Read More »

November 27, 2015

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 »

December 26, 2014

Given coordinates of four points in a plane, find if the four points form a square or not.

October 2, 2014

A triangulation of a convex polygon is formed by drawing diagonals between non-adjacent vertices (corners) such that the diagonals never intersect.

May 27, 2014

Area of a circle can simply be evaluated using following formula.

Area of a triangle can simply be evaluated using following formula.

February 19, 2014

Given two rectangles, find if the given two rectangles overlap or not.