https://oj.leetcode.com/problems/search-in-rotated-sorted-array/
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7
might become 4 5 6 7 0 1 2
).
You are given a target value to search. If found in the array return its index, otherwise return -1.
You may assume no duplicate exists in the array.
'풀어본 Algorithm 문제 정리' 카테고리의 다른 글
[OJ.leetcode] maximum-depth-of-binary-tree (0) | 2014.08.23 |
---|---|
[OJ.leetcode] add two numbers (1) | 2014.08.21 |
[OJ.leetcode] combinations (0) | 2014.08.18 |
[OJ.leetcode] sort-colors (1) | 2014.08.17 |
[OJ.leetcode] substring-with-concatenation-of-all-words (1) | 2014.08.15 |