Bitonic Partitioning
Problem Overview
- Count the ways to split an array into contiguous partitions so the sequence of partition averages is strictly increasing then strictly decreasing, with at least three partitions.
- Input: array arr with 1 < n ≤ 100 and values in [-1e9, 1e9]; Output: number of valid partitionings.
- Domain: array segmentation and sequence analysis where each partition is represented by its average.
- Source: From Rubrik interviews; a coding interview problem and common interview question.
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:
