Binary Seach
Imagine you’re searching for a word in a dictionary.You don’t start from page 1, right?You open somewhere in the middle. If your word comes before → go left If it comes after → go right This is ex
Apr 13, 20263 min read19

Search for a command to run...
Articles tagged with #software-engineering
Imagine you’re searching for a word in a dictionary.You don’t start from page 1, right?You open somewhere in the middle. If your word comes before → go left If it comes after → go right This is ex

When I first saw this problem, it looked very simple… But it actually teaches an important concept:How to optimize from 2 passes → 1 pass using two pointers Problem Statement You are given an array c
