Maximum Value in an array of Increasing and Decreasing using Binary Search

Asked In: AmazonIntuitUber

One array of integers is given as an input ,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: array[] = {3, 5,15, 50, 11, 10, 8, 6}


Problem level: Medium