## Number of pairs of lines having integer intersection points

Given two integer arrays P[] and Q[], where pi and qj for each 0 <= i < size(P) and 0 <= j < size(Q) represents… Read More »

## Percentage change in Hemisphere volume if radius is changed

Given that the radius of a hemisphere is changed by a fixed percentage so, the target is to calculate the percentage changed in the volume… Read More »

## How to discretize an Ellipse or Circle to a Polygon using C++ Graphics?

In this article, we’ll see how to discretize an Ellipse (or a circle) into a polygon. Since a circle is just a specific case of… Read More »

## Area of the circle that has a square and a circle inscribed in it

Given the side of a square a which is kept inside a circle. It keeps expanding until all four of its vertices touch the circumference… Read More »

## Julia Fractal set in C/C++ Using Graphics

CC BY-SA 4.0, Link The Julia set is associated with those points z = x + iy on the complex plane for which the series… Read More »

## Find the maximum angle at which we can tilt the bottle without spilling any water

Given a water bottle with the shape of a rectangular prism whose base is a square of side x cm and height y cm, the… Read More »

## Find the integer points (x, y) with Manhattan distance atleast N

Given a number N, the task is to find the integer points (x, y) such that 0 <= x, y <= N and Manhattan distance… Read More »

## Find if the glass will be empty or not when the rate of drinking is given

Given a cylinder glass with diameter equals D centimeters. The initial level of water in the glass equals H centimeters from the bottom. You drink… Read More »

## Find the centroid of a non-self-intersecting closed Polygon

Given N vertices of the polygon, the task is to find the centroid of the polygon Examples: Input: ar = {{0, 0}, {0, 8}, {8,… Read More »

## Find the coordinates of a triangle whose Area = (S / 2)

Given an integer S, the task is to find the coordinates of a triangle whose area is (S / 2). Examples: Input: S = 4… Read More »

## Find if a crest is present in the index range [L, R] of the given array

Given an array arr[] of N distinct elements and an index range [L, R]. The task is to find whether a crest is present in… Read More »

## Sum of internal angles of a Polygon

Given an integer N, the task is to find the sum of interior angles of an N-sided polygon. A plane figure having a minimum of… Read More »

## Find Partition Line such that sum of values on left and right is equal

Consider n points on the Cartesian Coordinate Plane. Let point (Xi, Yi) is given a value Vi. A line parallel to y-axis is said to… Read More »

## Number of ways N can be divided into four parts to construct a rectangle

Given an integer N, the task is to divide the number into four parts such that the divided parts can be used to construct a… Read More »

## Number of triangles that can be formed

Given a square with N points on each side of the square and none of these points co-incide with the corners of the square. The… Read More »