L63 Search in Rotated Sorted Array II
Follow up for L62
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.
Example
Given[1, 1, 0, 1, 1, 1]
and target =0
, returntrue
.
Given[1, 1, 1, 1, 1, 1]
and target =0
, returnfalse
.
这题跟上题很像,不过得去重。
Last updated