Skip to content

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.

Where the book teaches it

Related terms

sort.SearchInts