Skip to content

Tag Archives: Binary Search

Given a 2D array arr[][] where each array element denotes a point in the X axis and the number of elements on that point. A… Read More
Given a sorted array arr[] consisting of N integers which denote the position of a stall. You are also given an integer K which denotes… Read More
Given a number n, find the cube root of n.Examples:  Input: n = 3 Output: Cubic Root is 1.442250 Input: n = 8 Output: Cubic… Read More
Given an integer X, find its square root. If X is not a perfect square, then return floor(√x). Examples :  Input: x = 4Output: 2Explanation:… Read More
Given two integers one is a dividend and the other is the divisor, we need to find the quotient when the dividend is divided by… Read More
Given a matrix arr[][] of size M * N, where arr[i][j] represents the height of the cell (row, col). The task is to find a… Read More
There is only one room which is holding N meetings that are given as intervals of the form (start[i], end[i], people[i]) where start[i] is the… Read More
Given two strings X and Y, the task is to find the length of the longest common substring.  Examples: Input: X = “GeeksforGeeks”, y =… Read More
Geek is organizing a party at his house. For the party, he needs exactly N (N ≤ 103) donuts for the guests. Geek decides to order the donuts from a… Read More
Given two integers X and S, the task is to find the minimum length of the sequence of positive integers such that the sum of… Read More
Given an array A[] of N positive integers and 3 integers X, Y, and Z, the task is to check if there exist 4 indices… Read More
Given an array Arr[] of size N, the cost of removing ith element is Arr[i]. The task is to remove the maximum number of elements… Read More
Given an array A[] of N integers, the task is to find the number of pairs of indices (1 ≤ i, j ≤ N) in… Read More
 Given an array arr[] of distinct elements size N that is sorted and then around an unknown point, the task is to count the number… Read More
Given an array arr[] of size N, the task is to find the last element remaining after removing all elements closest to sum/2 sequentially where… Read More

Start Your Coding Journey Now!