liyin2015 / python-coding-interview

A middle-to-high level open source algorithm book designed with coding interview at heart!
Apache License 2.0
2.13k stars 449 forks source link

Binary Search wrong description #15

Open jenyuanhuang opened 3 years ago

jenyuanhuang commented 3 years ago

Decrease and Conquer - Binary Search • If it is smaller than the target, move to the left half by setting the right pointer to the position right before the middle position, r = m − 1. • If it is larger than the target, move to the right half by setting the left pointer to the position right after the middle position, l = m + 1.

luizfboss commented 1 year ago

Fixed it. Please approve my pull request - #23