A rotated sorted array of distinct integers is pivoted at some unknown index. Given a target value, return its index if it is in the array, otherwise return -1. Solve it in O(log n) time complexity.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.