LeetCode
Binary Search
Click
here
for an explanation.