A mountain array increases strictly to a single peak and then decreases strictly. Given a mountain array arr, return the index of the peak in O(log n).
Input: one line of space-separated integers (a valid mountain). Output: the peak index.
0 1 0
1
0 10 5 2
1
3 9 8 6 4
1
Run your code against the sample tests, or Submit to run the full suite.