Search in Rotated Sorted Array

#33
Medium
Binary Search
O(log n)
O(1)
Amazon
Microsoft
Facebook
LinkedIn
View on LeetCode

Problem Description

You are given an integer array nums sorted in ascending order (with distinct values), and an integer target. The array is rotated at some pivot. Search for target and return its index.