Skip to content

Tag Archives: Binary Search

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
Given a sorted array arr[] of size N, where arr[i] denotes the starting position of a sequence, the task is to find the minimum number… Read More
Given an array task[] of size N denoting amount of work to be done for each task, the problem is to find the minimum amount… Read More
Given a 2D array A[][] of size N x 2 where: Every element lies between [1, N]. A[i][0] signifies that there must be at most… Read More
Pre-requisite: Binary Search Bitwise Binary Search algorithm is a modified version of Binary Search based on the following idea: Every number can be represented as… Read More
The binary search algorithm is used in many coding problems, and it is usually not very obvious at first sight. However, there is certainly an… Read More
Given an array arr[] denoting the radius of circular pizzas and an integer N denoting the number of friends. The task is to calculate the… Read More
Given an array arr[] of N intervals, the task is to calculate the index of the closest interval to the right of each of the… Read More

Start Your Coding Journey Now!