## Minimum cuts required to divide the Circle into equal parts

Given an array arr which represents the different angles at which a circle is cut, the task is to determine the minimum number of more… Read More »

## GCD of a number raised to some power and another number

Given three numbers a, b, n. Find GCD(an, b). Examples: Input : a = 2, b = 3, n = 3 Output : 1 2^3… Read More »

## Largest N digit number divisible by given three numbers

Given four integers x, y, z and n, the task is to find the largest n digit number which is divisible by x, y and… Read More »

## Minimum squares to evenly cut a rectangle

Given a rectangular sheet of length l and width w. we need to divide this sheet in the square sheets such that the number of… Read More »

## Check if there is any pair in a given range with GCD is divisible by k

Given a range, we need to check if is their any pairs in the segment whose GCD is divisible by k. Examples: Input : l=4,… Read More »

## Program to find Nth term divisible by a or b

Given two integers and . The task is to find the Nth term which is divisible by either of or . Examples : Input :… Read More »

## Online Queries for GCD of array after divide operations

You are given an array of N integer values and M update operations. An update consists of choosing an element of the array and dividing… Read More »

## Maximum difference elements that can added to a set

Given a set containing N elements, you are allowed to add an element Z > 0 to this set only if it can be represented… Read More »

## Count of common multiples of two numbers in a range

Given a range from L to R and every Xth tile is painted black and every Yth tile is painted white in that range from… Read More »

## All possible co-prime distinct element pairs within a range [L, R]

Given a range [L, R], the task is to find all possible co-prime pairs from the range such that an element doesn’t appear in more… Read More »

## Number of distinct integers obtained by lcm(X, N)/X

Given a number , find the number of distinct integers obtained by lcm(X, N)/X where X can be any positive number. Examples: Input: N =… Read More »

## Print N lines of 4 numbers such that every pair among 4 numbers has a GCD K

Given N and K, the task is to print N lines where each line contains 4 numbers such that every among those 4 numbers has… Read More »

## Program to calculate the value of nCr Efficiently

Given two numbers n, r ( n>=r ). The task is to find the value of C(n, r) for big value of n. Examples: Input:… Read More »

## Number of Co-prime pairs from 1 to N with product equals to N

Given a number N. The task is to find the number of co-prime pairs (a, b) from 1 to N such that their product(a*b) is… Read More »

## Find the GCD of N Fibonacci Numbers with given Indices

Given indices of N Fibonacci numbers. The task is to find the GCD of the Fibonacci numbers present at the given indices. The first few… Read More »