Search in Rotated Sorted Array

The hardest point lies in how to write the if sentence right. Because it is a rotated ascendingly sorted array, there are basic two kinds of conditions.
In each condition, we need to find the right circumstances that we move the h pointer and l pointer. It is a little tricky that in each condition you can only move one pointer instead of two.


图片发自App

你可能感兴趣的:(Search in Rotated Sorted Array)