##
Pizza cut problem (Or Circle Division by Lines)
March 4, 2017

Given number of cuts, find the maximum number of possible pieces. Examples: Input : 2 Output : 4 Input : 3 Output : 7 Recommended:… Read More »

March 4, 2017

Given number of cuts, find the maximum number of possible pieces. Examples: Input : 2 Output : 4 Input : 3 Output : 7 Recommended:… Read More »

February 26, 2017

We are given four segments as a pair of coordinates of their end points. We need to tell whether those four line segments make a… Read More »

Given many intervals as ranges and our position. We need to find minimum distance to travel to reach such a point which covers all the… Read More »

February 21, 2017

Given two points pointU and pointV in XY-space, we need to find a point which has integer coordinates and lies on a line going through… Read More »

January 30, 2017

Given an array of n positive distinct integers representing lengths of lines that can form triangle. The task is to find the number of acute… Read More »

January 18, 2017

We have a circle centered at origin (0, 0). As input we are given with starting angle of the circle sector and the size of… Read More »

January 10, 2017

Given a paper of size A x B. Task is to cut the paper into squares of any size. Find the minimum number of squares… Read More »

January 8, 2017

Given n coordinate (x, y) of points on 2D plane and Q queries. Each query contains an integer r, the task is to count the… Read More »

January 7, 2017

Given some points on a plane, which are distinct and no three of them lie on the same line. We need to find number of… Read More »

December 24, 2016

Given a matrix of N rows and M columns, consist of 0’s and 1’s. The task is to find the perimeter of subfigure consisting only… Read More »

December 18, 2016

Given a set of lines and a rectangular area of interest, the task is to remove lines which are outside the area of interest and… Read More »

December 15, 2016

Given hypotenuse and area of a right angle triangle, get its base and height and if any triangle with given hypotenuse and area is not… Read More »

December 8, 2016

Given a circle of radius r in 2-D with origin or (0, 0) as center. The task is to find the total lattice points on… Read More »

November 16, 2016

Given an integer n, find the nth Pentagonal number. First three pentagonal numbers are 1, 5 and 12 (Please see below diagram). The n’th pentagonal… Read More »

November 12, 2016

We have N coins which need to arrange in form of a triangle, i.e. first row will have 1 coin, second row will have 2… Read More »