An ascending array of distinct integers was rotated between 1 and n times (a rotation moves the last element to the front). Given the resulting array nums, return its minimum element.
Your algorithm must run in O(log n) time.
[3,4,5,1,2][4,5,6,7,0,1,2][11,13,15,17][2,1][1][5,1,2,3,4]