Search in Rotated Sorted Array — JavaScript medium interview problem
There is an integer array `nums` sorted in ascending order (distinct values), rotated at an unknown pivot. Given `target`, return its index or -1 if not found. Aim for O(log n).
Tags: binary-search
Practice this Arrays problem free in the JS Interview Playground with automated tests and unlockable solutions.