 All Problems
Search in Rotated Sorted Array II
medium
binary search
arrays
amazon
google
facebook
microsoft

Given a rotated sorted array nums that may contain duplicates, and a target, return true if target is in the array, false otherwise.

Example 1:

Input: 2 5 6 0 0 1 2
Target: 0
Output: true

Example 2:

Input: 2 5 6 0 0 1 2
Target: 3
Output: false

Input format: Line 1: space-separated array. Line 2: target.

Output format: true or false.

Run to check your code against the sample cases, or submit to run every case