Practise binary search on sorted values, boundaries, rotated arrays, answer ranges, partitions and matrices.
Log in/Sign up to track your progress
Striver’s Binary Search Sheet contains 32 coding questions covering lookup, lower and upper bounds, rotations, roots, missing values, searches over possible answers, sorted-array partitions, peaks and matrices. The list includes all 32 practice questions from the corresponding A2Z section. The foundation is explaining which candidate region a comparison can safely discard.
Treat the groups as different uses of search reasoning rather than one loop with different conditions. Exact lookup, first qualifying position and minimum feasible capacity ask for different boundaries. Some variants depend on sorted values, while others depend on a monotonic feasibility condition or a special structural guarantee supplied by the problem.
The early questions cover direct lookup and boundaries. Rotated arrays and special positions then use structural information rather than ordinary sorted lookup alone. Searches over possible answers require a monotonic feasibility check, while matrix questions depend on the precise ordering guarantees in their statements.
Be comfortable with array positions, integer division, comparisons and loops. The array foundations and shared programming track cover those prerequisites. A separate feasibility function also needs to be correct before an outer binary search can use it to locate a boundary.
Be comfortable with indices, integer division, comparisons and loops. Understand the difference between a closed range and a half-open range, then follow one convention consistently. Before searching possible answers, learn to write a separate feasibility check and explain which direction preserves success. The outer search cannot repair an incorrect or nonmonotonic check.