Pivot In Sorted And Rotated Array
easy
1. You are given an array(arr) of distinct integers, which is sorted and rotated around an unknown point. 2. You have to find the smallest element in O(logN) time-complexity
Constraints
1 <= N <= 10000 -10^9 <= arr[i] <= 10^9
Format
Input
An Integer N arr1 arr2.. n integers
Output
The smallest element
Example
Sample Input
9
15
16
19
21
23
24
1
2
12
Sample Output
1
Question Video