## Program to find smallest difference of angles of two parts of a given circle

Given a division of circle into n pieces as an array of size n. The i-th element of the array denotes the angle of one… Read More »

Given a division of circle into n pieces as an array of size n. The i-th element of the array denotes the angle of one… Read More »

In mathematics, Sexy Primes are prime numbers that differ from each other by six. For example, the numbers 5 and 11 are both sexy primes,… Read More »

Given three positive integers X, Y and P. Here P denotes the number of turns. Whenever the turn is odd X is multiplied by 2… Read More »

Three players P1, P2 and P3 are playing a game. But at a time only two players can play the game, so they decided, at… Read More »

Given the total number of bricks T, find the number of stair steps that can be formed by using given bricks such that if step… Read More »

Given two polynomial A(x) and B(x), find the product C(x) = A(x)*B(x). There is already an O() naive approach to solve this problem. here. This… Read More »

Given a number n, find sum of first n natural numbers. To calculate the sum, we will use a recursive function recur_sum(). Examples : Input… Read More »

We have to paint n boards of length {A1, A2, .. An}. There are k painters available and each takes 1 unit time to paint… Read More »

The Schröder–Hipparchus numbers form an integer sequence that can be used to count the number of plane trees with a given set of leaves, the… Read More »

Given N, find sum of squares of first N natural number. Examples : Input : n = 2 Output : 5 Explanation: 1^2+2^2 = 5… Read More »

In number theory, a Leyland number is a number of the form xy + yx, where x and y are integers greater than 1 and… Read More »

Given an unsigned integer, reverse all bits of it and return the number with reversed bits. Examples: Input : n = 1 Output : 2147483648… Read More »

Given a string S of length n and a positive integer k. The task is to find number of Palindromic Subsequences of length k. Examples:… Read More »

Given two integer a and b, find whether their product (a x b) exceed the signed 64 bit integer or not. If it exceed print… Read More »

A pyramid is a 3-dimensional geometric shape formed by connecting all the corners of a polygon to a central apex. There are many types of… Read More »