Skip to content

Tag Archives: Binary Search

Given an array arr[] of size n, the task is to find the maximum possible size x of a subset such that there are exactly… Read More
Problem: Given a sorted array arr[] of n elements, write a function to search a given element x in arr[] and return the index of… Read More
Given  N coins, the sequence of numbers consists of {1, 2, 3, 4, ……..}. The cost for choosing a number in a sequence is the… Read More
What is Binary Searching? Binary searching is a type of algorithm that can quickly search through a sorted array of elements. The algorithm works by… Read More
Given a positive array arr[] of size N (2 ≤ N ≤ 105) and a positive integer K, the task is to minimize the maximum… Read More
Given two strings A and B of the same length and two positive integers K and T. The task is to find the longest substring… Read More
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

Start Your Coding Journey Now!