Linkage
https://leetcode.com/problems/search-in-rotated-sorted-array/description/
Analysis
In this situation, we need another item for comparison when we determine which side to do further search. In my code, we set the first item of the array as the compliment to help us compare. To be more specific, the code show the two cases which composes of all the situation.
Code
1 | class Solution: |