Find Minimum in Rotated Array

00:00
MediumArrayBinary SearchDivide & Conquer
AmazonMicrosoft

Find the minimum element in a sorted array that has been rotated at some unknown pivot.

Examples

Input → [3,4,5,1,2]
Output → 1
Input → [4,5,6,7,0,1,2]
Output → 0
Input → [11,13,15,17]
Output → 11
Note: not rotated