grokking-algorithms/chapter1
2024-02-06 21:53:17 +00:00
..
binary.py clean up repo. 2024-02-06 21:53:17 +00:00
README.md clean up repo. 2024-02-06 21:53:17 +00:00

Binary Search

Repeatedly split the array checking if value is greater or less than the mid point. Stop when the exact value is found.

It takes log N steps to reduce an array of size N to an array of size 1. Time complexity for this algorithm is O(log N).