Courses
Sale
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.6K+ articles
Misc
7.7K+ articles
Mathematical
5.1K+ articles
Arrays
4.2K+ articles
Amazon
1.9K+ articles
Greedy
1.4K+ articles
Sorting
1.1K+ articles
Searching
1.0K+ articles
Divide and Conquer
143+ articles
Binary Search
525+ posts
Recent Articles
Nth Number Having At Most K Set Bits
Last Updated: 01 August 2026
Given two integers n and k, find the nth non-negative integer whose binary representation contains at most k set bits (1s). The numbers are considered in increasing order ...
read more
DSA
Binary Search
digit-DP
Check if Floor and Ceil Diff in an Array is Same for a Number
Last Updated: 25 July 2026
Given a sorted array arr[] and an integer x, determine whether x is at the same absolute distance from its floor and ceil i.e. the difference between x and its floor is th...
read more
DSA
Binary Search
Maximum Number of Bridges
Last Updated: 10 July 2026
Given two integer arrays arr1[] and arr2[] of same size, where a bridge can be built between point arr1[i] on one bank of a river and point arr2[i] on the opposite bank. F...
read more
DSA
Binary Search
Algorithms-Dynamic Programming
Count Frequency of an Element in a Given Range
Last Updated: 01 June 2026
Given an array arr[] of integers and a 2D array queries[][], where each queries[i] contains three integers: l, r, and x. For each query, determine how many times the eleme...
read more
DSA
Binary Search
Upper Bound
Last Updated: 05 August 2025
Given a sorted array arr[] and a number target, find the upper bound of the target in this given array. The upper bound of a number is defined as the smallest index in the...
read more
Searching
DSA
Arrays
Binary Search
Lower Bound
Last Updated: 05 August 2025
Given a sorted array arr[] and a number target, find the lower bound of the target in this given array. The lower bound of a number is defined as the smallest index in the...
read more
Searching
DSA
Arrays
Binary Search
Search in matrix where only individual columns are sorted
Last Updated: 23 July 2025
Given an n * m semi-sorted 2D matrix, mat[][] where each column is individually sorted in ascending order but the rows are not sorted, and a target element x. The task is ...
read more
Divide and Conquer
Searching
Matrix
DSA
Binary Search
Search in row wise sorted matrix
Last Updated: 23 July 2025
Given a row-wise sorted matrixmat[][]and an integerx, the task is to check ifxis present inmat[][]or not. Note that there is no ordering among column elements.Examples:Inp...
read more
Divide and Conquer
Searching
Matrix
DSA
Binary Search
CSES Solutions - Multiplication Table
Last Updated: 23 July 2025
Find the middle element when the numbers in an n × n multiplication table are sorted in increasing order. It is assumed that n is odd.For example, the 3 × 3 multiplication...
read more
Picked
DSA
Binary Search
CSES Problems
Minimize the Maximum Value in Two Arrays
Last Updated: 23 July 2025
Given two empty arrays arr1[] and arr2[]. You need to add positive integers to these arrays such that they satisfy the following conditions:arr1 contains k1 distinct posit...
read more
Picked
DSA
Arrays
Goldman Sachs
Binary Search
Find Maximum Number of Removal Queries That Can Be Processed I
Last Updated: 29 April 2024
Given an array called arr[] and another array queries[]. You can perform an operation on arr at most once, replacing it with a subsequence of itself. Then, you process the...
read more
Picked
DSA
Arrays
Amazon
Binary Search
Algorithms-Dynamic Programming
bsearch() Function in C
Last Updated: 15 April 2024
In C programming language, bsearch()function is used to perform a binary search on a sorted array to search for an element. The namebsearchstands for “binary search” which...
read more
C Language
Picked
Binary Search
C Library Functions
CPP Examples
CSES Solutions - Factory Machines
Last Updated: 23 July 2025
A factory has N machines which can be used to make products. Your goal is to make a total of T products.For each machine, you know the number of seconds it needs to make a...
read more
Picked
DSA
Binary Search
CSES Problems
CSES Solutions - Array Division
Last Updated: 23 July 2025
You are given an array arr[] containing N positive integers. Your task is to divide the array into K subarrays so that the maximum sum in a subarray is as small as possibl...
read more
Picked
DSA
Binary Search
CSES Problems
In what situation can we use binary search?
Last Updated: 23 July 2025
Binary search is a powerful algorithm that can be used to find a target value within a sorted array. It works by repeatedly dividing the array in half until the target val...
read more
Searching
DSA
Binary Search
Data Structures and Algorithms-QnA
1
2
3
4
...
35
✕