Technical interviews — binary search

Uniqtech
Interview Buddy
Published in
5 min readMar 17, 2020

--

When in doubt, consider binary search in a technical interview. In technical interviews O(n) is king and O(lg(n)) is definitely the holy grail.

The CS50 professor at Harvard famous demonstrated binary search by looking for a name in the yellow page phone book, and discard half of it at a time (a divide and conquer approach) and dramatically throw the half away. Thereby he was able to reduce the problem by half.

There are many ways to test your knowledge of binary search. And chances are doing a direct binary search is not it.

--

--