Binary Search and API Design
A coding discussion. Solve a small search task clearly, then show how you would expose it inside a service.
The questions in this round
Implement a function that searches a sorted collection for a target. Explain your invariants and complexity.
This function now sits behind an API used by several teams. What belongs around it?