Glossary: Coding Interviews in C++
Binary search
Also written: std::lower_bound
Finding something in sorted data by repeatedly checking the middle and discarding half. It costs O(log n), and also solves "first day that reaches a goal" questions.
Glossary: Coding Interviews in C++
Also written: std::lower_bound
Finding something in sorted data by repeatedly checking the middle and discarding half. It costs O(log n), and also solves "first day that reaches a goal" questions.