One array of integers is given as an input array which is initially increasing and then decreasing or it can be only increasing or decreasing. You need to find the maximum value in the array in O(Log n) Time complexity and O(1) Space Complexity.
Input : [3, 5,15, 50, 11, 10, 8, 6]
Find max value in array
Constraint1 :Find Max value in O(log n) time complexity.
Hint : Think for using Binary Search
Problem level: Easy