Available question text
Given a non-decreasing sorted array rotated at an unknown pivot (and possibly containing duplicates), determine whether a target value exists in the array. The core challenge is adapting binary search to handle rotation and equal elements, which can in the worst case degrade the runtime from logarithmic to linear when duplicates obscure the sorted half.
Related questions
Continue with questions that share topics or the same question type.
- Search in Rotated Sorted Array
Coding · Array · Binary Search
- Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand (e.g., [4,5,6,7,0,1,2]). Search for a target value and return its index, or -1 if not found. Required time complexity: O(log n).
Coding
- Check if Array Is Sorted and Rotated
Coding
- Convert Sorted Array to Binary Search Tree
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Microsoft
Leetcode 81. Search in Rotated Sorted Array II
Reported Jan 1, 2020 · 1 source report
MID_LEVEL
Source snapshot: Nov 12, 2026
View source