Skip to content

Commit 430998b

Browse files
committed
update problem description
1 parent 878171e commit 430998b

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

zh-hans/binary_search/search_in_rotated_sorted_array.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
1+
---
2+
difficulty: Medium
3+
tags:
4+
- Binary Search
5+
- LinkedIn
6+
- Array
7+
- Facebook
8+
- Sorted Array
9+
- Uber
10+
- Microsoft
11+
- Bloomberg
12+
title: Search in Rotated Sorted Array
13+
---
14+
115
# Search in Rotated Sorted Array
216

3-
## Question
17+
## Problem
18+
19+
### Metadata
420

5-
- leetcode: [Search in Rotated Sorted Array | LeetCode OJ](https://leetcode.com/problems/search-in-rotated-sorted-array/)
6-
- lintcode: [(62) Search in Rotated Sorted Array](http://www.lintcode.com/en/problem/search-in-rotated-sorted-array/)
21+
- tags: Binary Search, LinkedIn, Array, Facebook, Sorted Array, Uber, Microsoft, Bloomberg
22+
- difficulty: Medium
23+
- source(leetcode): <https://leetcode.com/problems/search-in-rotated-sorted-array/>
24+
- source(lintcode): <https://www.lintcode.com/problem/search-in-rotated-sorted-array/>
725

8-
### Problem Statement
26+
### Description
927

1028
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
1129

1230
(i.e., `0 1 2 4 5 6 7` might become `4 5 6 7 0 1 2`).
1331

14-
You are given a target value to search. If found in the array return its
15-
index, otherwise return -1.
32+
You are given a target value to search. If found in the array return its index, otherwise return -1.
1633

1734
You may assume no duplicate exists in the array.
1835

@@ -26,7 +43,7 @@ For `[4, 5, 1, 2, 3]` and `target=0`, return `-1`.
2643

2744
O(logN) time
2845

29-
## 题解 - 找到有序数组
46+
## 题解
3047

3148
对于旋转数组的分析可使用画图的方法,如下图所示,升序数组经旋转后可能为如下两种形式。
3249

0 commit comments

Comments
 (0)