# Middle-题目48：81. Search in Rotated Sorted Array II

Follow up for “Search in Rotated Sorted Array”:
What if duplicates are allowed?

Would this affect the run-time complexity? How and why?

Write a function to determine if a given target is in the array.

public class Solution {
public boolean search(int[] nums, int target) {
for(int num:nums)
if(num==target)
return true;
return false;
}
}

1ms,beats 21.80%,众数1ms,78.20%
Cmershen的碎碎念：

#### Search in Rotated Sorted Array II -- LeetCode

2014-03-06 02:04:55

#### leetcode 81. Search in Rotated Sorted Array II-旋转数组|二分查找

2016-06-07 11:34:23

#### [LeetCode]81.Search in Rotated Sorted Array II

2014-01-15 22:29:05

#### Search in Rotated Sorted Array -- LeetCode

2014-03-05 09:15:45

#### 【LEETCODE】33-Search in Rotated Sorted Array [Python]

2016-01-22 11:26:41

#### leetcode 6. 在有序数组旋转后搜索 Search in Rotated Sorted Array

2015-04-27 15:36:11

#### Find Minimum in Rotated Sorted Array II -- LeetCode

2014-10-25 07:12:45

#### 【LeetCode】Search in Rotated Sorted Array 解题报告

2014-10-25 17:00:36

#### Find Minimum in Rotated Sorted Array -- LeetCode

2014-10-25 07:11:17

#### LeetCode 33 Search in Rotated Sorted Array（在旋转排序数组中搜索）（*）

2015-11-26 18:50:31