## Maximize distance between any two consecutive 1’s after flipping M 0’s

Given the size of a binary array consisting of 0’s only as n and an integer m which is the number of flips allowed from… Read More »

## Radius of the inscribed circle within three tangent circles

There are 4 circles with positive integer radius r1, r2, r3 and r4 as shown in the figure below. The task is to find the… Read More »

## Minimum K such that sum of array elements after division by K does not exceed S

Given an array arr[] of N elements and an integer S. The task is to find the minimum number K such that the sum of… Read More »

## Longest substring with K unique characters using Binary Search

Given a string str and an integer K, the task is to print the length of the longest possible substring that has exactly K unique… Read More »

## Value to be subtracted from array elements to make sum of all elements equals K

Given an integer K and an array height[] where height[i] denotes the height of the ith tree in a forest. The task is to make… Read More »

## Count of quadruplets with given sum | Set 3

Given four arrays containing integer elements and an integer sum, the task is to count the quadruplets such that each element is chosen from a… Read More »

## Check if value exists in level-order sorted complete binary tree

Given a level-order sorted complete binary tree, the task is to check whether a key exists in it or not. A complete binary tree has… Read More »

## Largest area square in an array when elements can be shuffled

Given an array arr[] of N integers where arr[i] is the height of the ith chocolate and all the chocolated are 1 unit wide, the… Read More »

## Kth number from the set of multiples of numbers A, B and C

Given four integers A, B, C and K. Assume that all the multiples of A, B and C are stored in a set in sorted… Read More »

## Find next greater element with no consecutive 1 in it’s binary representation

Given Q queries where each query consists of an integer N and the task is to find the smallest integer greater than N such that… Read More »

## Nth number in a set of multiples of A , B or C

Given four integers N, A, B and C. The task is to print the Nth number in the set containing the multiples of A, B… Read More »

## Find the farthest smaller number in the right side

Given an array arr[] of size N. For every element in the array, the task is to find the index of the farthest element in… Read More »

## Length of longest subarray in which elements greater than K are more than elements not greater than K

Given an array arr[] of length N. The task is to find the length of the longest subarray in which elements greater than a given… Read More »

## Smallest element greater than X not present in the array

Given an array arr[] of size N and an integer X. The task is to find the smallest element greater than X which is not… Read More »

## Remove minimum elements from the array such that 2*min becomes more than max

Given an array of size N. The task is to remove minimum elements from the array such that twice of minimum number is greater than… Read More »