← 返回 amazon 的题目列表Search Value in Rotated Sorted List
类型:online_judge
Given a sorted array rotated n times to the left and a value K, write a program to find if the value K exists in the array. If it exists, return its index; otherwise, return -1. The time complexity should be O(log n).
Example
Input
[4,5,6,7,0,1,2], 0