Search in Rotated Sorted Array

2018-06-01  本文已影响0人  sherrysack

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.


Search in Rotated Sorted Array
上一篇 下一篇

猜你喜欢

热点阅读