Find an index such that difference between product of elements before and after it is minimum

Given an integer arr[], the task is to find an index such that the difference between the product of elements up to that index and… Read More »

Area of plot remaining at the end

Given two integers N and M that represent the length and breadth of a rectangular plot and another integer K that represent the number of… Read More »

Find permutation of first N natural numbers that satisfies the given condition

Given two integer N and K, the task is to find the permutation P of first N natural numbers such that there are exactly K… Read More »

Largest even number that can be formed by any number of swaps

Given an integer N in the form of string, the task is to find the largest even number from the given number when you are… Read More »

Count number of 1s in the array after N moves

Given an array of size N in which initially all the elements are 0(zero). The task is to count the number of 1’s in the… Read More »

Number of positions such that adding K to the element is greater than sum of all other elements

Given an array arr[] and a number K. The task is to find out the number of valid positions i such that (arr[i] + K)… Read More »

Length of direct common tangent between two intersecting Circles

Given two circles, of given radii, have there centres a given distance apart, such that the circles intersect each other at two points. The task… Read More »

Radius of the circle when the width and height of an arc is given

Given a circle in which the width and height of an arc are given. The task is to find the radius of the circle with… Read More »

Shortest distance from the centre of a circle to a chord

Given a circle which has a chord inside it. The length of the chord and the radius of the circle are given. The task is… Read More »

Length of the direct common tangent between two externally touching circles

Given two circles, of given radii, that touch each other externally. The task is to find the length of the direct common tangent between the… Read More »

Shortest distance between a point and a circle

Given a circle with a given radius has its centre at a particular position in the coordinate plane. In the coordinate plane, another point is… Read More »

Length of direct common tangent between the two non-intersecting Circles

Given two circles, of given radii, have there centres a given distance apart, such that the circles don’t touch each other. The task is to… Read More »

Maximize the given number by replacing a segment of digits with the alternate digits given

Given a large number of N digits. We are also given with 10 numbers which represents the alternate number for all the one-digit numbers from… Read More »

Count unique numbers that can be generated from N by adding one and removing trailing zeros

Given a number N. Add one to the number in the first step and if the number has trailing zeros, remove all the trailing zeros… Read More »

Find element with the maximum set bits in an array

Given an array arr[]. The task is to find an element from arr[] which has the maximum count of set bits. Examples: Input: arr[] =… Read More »