Back to Binary SearchSearch in Rotated Sorted Array
Medium

Search in Rotated Sorted Array

MediumMust DoBinary SearchRotated Array

A sorted array has been rotated at an unknown pivot. Find the index of a target value in O(log n), or -1 if absent.

Loading editor…

No sample test cases yet.

Code execution is coming soon.