Problem Submissions Solution

Bitonic Point

Difficulty: Easy

Acceptance: %

Points: 20.00

Given an array of integers arr[] that first strictly increases and then potentially strictly decreases, find the bitonic point, which is the maximum element in the array. The bitonic point is the position where elements before it are strictly increasing, and elements after it are strictly decreasing.


Topics

Companies

Articles

Examples:

Input: arr[] = [1, 2, 4, 5, 7, 8, 3]

Output: 8

Explanation: Elements before 8 are strictly increasing [1, 2, 4, 5, 7] and elements after 8 are strictly decreasing [3].

Input: arr[] = [10, 20, 30, 40, 50]

Output: 50

Explanation: Elements before 50 are strictly increasing [10, 20, 30 40] and there are no elements after 50.

Expected Time Complexity: O(log n)

Expected Auxiliary Space: O(1)

Constraints:
  • 3 <= arr.size() <= 10^5
  • 1 <= arr[i] <= 10^6
Companies:
Amazon Microsoft Flipkart
Topics:
Searching Algorithm
Locked Content
Access Restricted: Please Login to access the code editor and test cases.