Binary SearchSearch in Rotated Sorted Array
Progress
solution.py
⌘↵ run
Loading...

Search in Rotated Sorted Array

medium
You'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