LeetCode
Search in Rotated Sorted Array II
Click
here
for an explanation.