Given a rotated sorted array with no duplicates, search for a target value. Return its index or -1.
Input: nums=[4,5,6,7,0,1,2], target=0 Output: 4 Input: nums=[4,5,6,7,0,1,2], target=3 Output: -1
Unlock hints progressively β start gentle, go deeper only if needed.
Level 1: Gentle Nudge
A subtle direction
Level 2: Approach
The algorithm to use
Level 3: Detailed
Step-by-step guidance
to save progress and use AI features