Find Length of Longest Bitonic Subarray

Problem Overview

  • Find the length of the longest contiguous subarray that is bitonic (non-decreasing then non-increasing).
  • Input: array of integers; Output: an integer for the maximum bitonic subarray length.
  • Focuses on contiguous ranges; equal adjacent values are allowed in both phases.
  • A common coding interview problem and interview question, relevant to trend analysis in time series like stocks or sensors.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: