Skip to content

Tag Archives: Binary Search

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
A bike race is being organised with N bikers. The initial speed and the acceleration of the bikers are given in arrays H[] and A[]… Read More
Given an array arr[] of size N and integers L and R defining the given range, the task is to find the number of elements… Read More
Searching Algorithms are designed to check for an element or retrieve an element from any data structure where it is stored. Mainly the widely used… Read More
Given an array arr[] of size N representing the time taken by a person to complete a task. Also, an array restTime[] which denotes the… Read More
Given an array arr[] which contains N positive integers and an integer K. The task is to count all triplets whose XOR is equal to… Read More
Given an array A[] of size N consisting of N integers, the task is to count the number of pairs such that their average is… Read More
Consider an integer sequence S, which is initially empty (i.e. S = {}). Also given are Q queries, each of which is one of the… Read More

Start Your Coding Journey Now!