# Category Archives: Geometric

## Program for Area Of SquareSeptember 24, 2017

A square is a flat shape, in one plane, defined by four points at the four corners. A square has four sides all of equal… Read More »

## Maximum number of squares that can fit in a right angle isosceles triangleSeptember 20, 2017

You are given an isosceles (a triangle with at-least two equal sides) right angle triangle with base b, we need to find the maximum number… Read More »

## Minimum Perimeter of n blocksSeptember 18, 2017

We are given n blocks of size 1 x 1, we need to find the minimum perimeter of the grid made by these blocks. Examples:… Read More »

## Check if a line touches or intersects a circleSeptember 17, 2017

Given coordinate of the center and radius > 1 of a circle and the equation of a line. The task is to check if the… Read More »

## Find if it’s possible to rotate the page by an angle or not.September 14, 2017

You are given three points a, b, c on a page. Find if it’s possible to rotate the page around the point by an angle,… Read More »

## Check whether given circle resides in boundary maintained by two other circlesSeptember 11, 2017

Given outer circle radius R and inner circle radius r, making circles from same center and forming boundary between them. Now, given X,Y co-ordinates which… Read More »

## Check if two given circles touch or intersect each other

There are two circle A and B with their centers C1(x1, y1) and C2(x2, y2) and radius R1 and R2. Task is to check both… Read More »

## Program to check if three points are collinearSeptember 5, 2017

Given three points, check whether they lie on a straight (collinear) or not Examples: Input : (1, 1), (1, 4), (1, 5) Output : Yes… Read More »

## Check whether a given point lies inside a rectangle or not

Given four points of a rectangle, and one more point P. Write a function to check whether P lies within the given rectangle or not.… Read More »

## Number of rectangles in N*M gridSeptember 4, 2017

We are given a N*M grid, print the number of rectangles in it. Examples: Input : N = 2, M = 2 Output : 9… Read More »

## Count of obtuse angles in a circle with ‘k’ equidistant points between 2 given pointsAugust 31, 2017

A circle is given with k equidistant points on its circumference. 2 points A and B are given in the circle. Find the count of… Read More »

## Number of unique rectangles formed using N unit squares

You are given N unit squares (squares with side length 1 unit), and you are asked to make rectangles using these squares. You have to… Read More »

## Neighbors of a point on a circle using Bresenham’s algorithmJuly 27, 2017

Given a center of a circle and its radius. our task is to find the neighbors of any point on the discrete circle. Examples: Input… Read More »

## Find mirror image of a point in 2-D planeJuly 18, 2017

Given a point P in 2-D plane and equation of mirror, the task is to find the image of that point Q formed due to… Read More »

## Equable ShapesJuly 16, 2017

A shape is equable if its area is equal to its perimeter. Given ordered coordinates of polygon find whether the shape is equable or not.… Read More »