← MakeMyTrip questions

Find number x in a rotated sorted array

Filed under MakeMyTrip

Given an integer array sorted in ascending order that has been rotated at an unknown pivot, and a target value `x`, return the index of `x` if it is in the array, or `-1` if it is not. You must write…

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 MakeMyTrip questions

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