Skip to content

Tag Archives: Binary Search

Given an array arr[] of integers, where the ith integer represents the position where an island is present, and an integer k (1 ≤ k… Read More
Given width and height of N rectangles. The task is to find the minimum number of rectangles left after inserting one into another. Note :   If… Read More
Given N non-overlapping ranges L[] and R[] where the every range starts after the previous range ends i.e. L[i] > R[i – 1] for all… Read More
Given a string str, its sub-strings are formed in such a way that all the sub-strings starting with the first character of the string will… Read More
Given four integers a, b, c, and k. The task is to find the minimum positive value of x such that ax2 + bx +… Read More
Given an array arr[] of N integers, the task is to select an integer x (which may or may not be present in the array)… Read More
Given an array arr[] of n distinct integers. Elements are placed sequentially in ascending order with one element missing. The task is to find the… Read More
Given a sorted array arr[] of integers and an integer k, the task is to find the count of elements in the array which are… Read More
Given a sorted array arr[] of distinct elements which is rotated at some unknown point, the task is to find the maximum element in it.Examples:  … Read More
Given an unsorted array arr[] of n integers and an integer k, the task is to find the kth largest element in the given index… Read More
Uniform Binary Search is an optimization of Binary Search algorithm when many searches are made on same array or many arrays of same size. In… Read More
Given an array of N integers which denotes the edges of N cubical structures respectively. Also given are M integers which denote the number of… Read More
Given an integer Y, find the smallest number X such that X! contains at least Y trailing zeros. Prerequisites – Count trailing zeroes in factorial of… Read More
Given an integer K and an array arr[], the task is to count all the sub-arrays whose product is divisible by K.Examples:   Input: arr[] =… Read More
Given an integer X, the task is to find the maximum value N such that the sum of first N natural numbers is not more… Read More

Start Your Coding Journey Now!