# Tag Archives: Binary Search

## Least root of given quadratic equation for value greater than equal to K

Given the constants of quadratic equation F(x) = Ax2 + Bx + C as A, B, and C and an integer K, the task is… Read More »

## Longest substring consisting of vowels using Binary Search

Given a string str of length N, the task is to find the longest substring which contains only vowels using Binary Search technique.Examples:   Input: str… Read More »

## Minimise N such that sum of count of all factors upto N is greater than or equal to X

Given a number X, the task is to find the minimum number N such that the sum of the count of all factors from 1… Read More »

## Minimise the maximum element of N subarrays of size K

Given an array arr[] and two integers N and K, the task is to choose non-overlapping N subarrays of size K such that maximum element… Read More »

## Longest subarray having sum K | Set 2

Given an array arr[] of size N containing integers. The task is to find the length of the longest sub-array having sum equal to the… Read More »

## Find the missing number in unordered Arithmetic Progression

Given an unsorted array arr[] of N integers that are in Arithmetic Progression, the task is to print the missing element from the given series.… Read More »

## Count of rotations required to generate a sorted array

Given an array arr[], the task is to find the number of rotations required to convert the given array to sorted form. Examples: Input: arr[]… Read More »

## Find the integral roots of a given Cubic equation

Given 5 integers say A, B, C, D, and E which represents the cubic equation , the task is to find the integral solution for… Read More »

## Floor value Kth root of a number using Recursive Binary Search

Given two numbers N and K, the task is to find the floor value of Kth root of the number N. The Floor Kth root… Read More »

## Longest subarray such that difference of max and min is at-most K

Given an array arr[] of length N, tark is to find the length of longest subarray such that difference of its maximum element and minumum… Read More »

## Check if a given number is a Perfect square using Binary Search

Check if a given number N is a perfect square or not. If yes then return the number of which it is a perfect square,… Read More »

## Smallest number to make Array sum at most K by dividing each element

Given an array arr[] of size N and a number K, the task is to find the smallest number M such that the sum of… Read More »

## Largest Square in a Binary Matrix with at most K 1s for multiple Queries

Given a binary matrix M where each element of the matrix will be 0 or 1, the task is to find the largest square that… Read More »

## Minimum capacity of small arrays needed to contain all element of the given array

Given an array of positive integers and a value K, The task is to empty the array in less than or equal to K small… Read More »

## Find minimum y coordinates from set of N lines in a plane

Given N lines in a plane in the form of a 2D array arr[][] such that each row consists of 2 integers(say m & c)… Read More »