A New Series on Cracking FAANG-Level Code Challenges
johnjr.dev·1d·
Discuss: Hacker News
📊Algorithms
Preview
Report Post

One of the most fundamental algorithms that appears in interviews at big tech companies is Binary Search. Of course, nobody will ask you to implement binary search directly. However, as Jon Bentley cited in his famous book Programming Pearls, only a small percentage of people he asked—10% to be precise—were able to code this algorithm without any errors.

Here, I will show you a correct implementation of binary search, its variants that appear in interviews, and LeetCode problems that you can solve using these techniques.

Binary Search

Given an array of items, we can find…

Similar Posts

Loading similar posts...