Glossary: Coding Interviews in Go
Binary search
Also written: pattern 3
Finding a position in sorted data by repeatedly checking the middle and discarding half. It costs O(log n), and can also find the 'first day that…' something is true.
Glossary: Coding Interviews in Go
Also written: pattern 3
Finding a position in sorted data by repeatedly checking the middle and discarding half. It costs O(log n), and can also find the 'first day that…' something is true.