solution.py
⌘↵ runLoading...
Search in Rotated Sorted Array
mediumYou've got this! Start small, think out loud.
An integer array of unique elements was sorted then rotated at an unknown pivot. Given the array and a target, return the index of the target or -1 if not present. Must be O(log n).
Time:O(log n)
Space:O(1)
binary-searchgoogle-favoritecommon-pattern
OUTPUT
Run your code to see output