Module 13 · binary_search, lower_bound, upper_bound and equal_range
Cheat Sheet: Binary Search and the Bounds on One Page
ProReading
This page is the module on one sheet, for the moment before a contest or an interview. Every line here was taught, run or measured in lessons 01 to 06. Nothing is new. Print it, or keep it open beside the editor.
Checking what this lesson needs for you…
What is inside Cheat Sheet: Binary Search and the Bounds on One Page
- The four calls and what they return
- The six counts
- The comparator rule
- The cost on each container
- Binary search on the answer
- The longest increasing subsequence in five lines
- The C++20 forms
- Which tool, in one table
- The eight traps
Module test
Ten questions on this module. Pass at 70%, and you can take it as many times as you like.
Take the module test