liyin2015 / python-coding-interview

A middle-to-high level open source algorithm book designed with coding interview at heart!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binary Search wrong description

jenyuanhuang opened this issue · comments

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.