← OYO questions

Search in a sorted, rotated array

Filed under OYO

Given an integer array `nums` sorted in ascending order (with distinct values) and rotated at an unknown pivot index, and an integer `target`, return the index of `target` if it is in `nums`, or `-1`…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related OYO questions

Collected from public candidate posts and coding forums. Updated Nov 2026.