Binary search interview questions
Sorted data, rotated arrays and searching on the answer.
6 questions solved with this pattern, most asked first. Reported by candidates in public interview write-ups and reworded by Scrivio. How the reports are counted
Your progress: 0 of 6 done, 0 saved
Search for an element in a sorted array that has been rotated.
Reported 60 times
Read the solutionSorting and searchingExample sources
3 of the write-ups counted: geeksforgeeks.org 2020, geeksforgeeks.org 2020, geeksforgeeks.org 2017
Search for a value in a matrix whose rows and columns are sorted.
Reported 45 times
Read the solutionMatrices and gridsExample sources
3 of the write-ups counted: geeksforgeeks.org 2020, geeksforgeeks.org 2020, geeksforgeeks.org 2020
Find the median of two sorted arrays combined.
Reported 17 times
Read the solutionSorting and searchingExample sources
3 of the write-ups counted: geeksforgeeks.org 2023, geeksforgeeks.org 2020, geeksforgeeks.org 2019
A sorted array has been rotated by an unknown amount. Find its smallest element.
Reported 17 times
Read the solutionSorting and searchingExample sources
3 of the write-ups counted: geeksforgeeks.org 2019, geeksforgeeks.org 2012, geeksforgeeks.org 2015
Search for a number in a sorted array using binary search.
Reported 16 times
Read the solutionSorting and searchingExample sources
3 of the write-ups counted: geeksforgeeks.org 2023, geeksforgeeks.org 2015, geeksforgeeks.org 2024
In a binary matrix whose rows are sorted, find the row with the most 1s.
Reported 16 times
Read the solutionMatrices and gridsExample sources
3 of the write-ups counted: geeksforgeeks.org 2016, geeksforgeeks.org 2024, geeksforgeeks.org 2012