Valid Mountain Array
Medium · rating 1300 · Arrays
The first line has n. The second line has n integers. Print YES if the array strictly increases to a single peak and then strictly decreases (the peak is neither the first nor last element), otherwise NO.
Constraints: 1 ≤ n ≤ 105
Related problems
- Maximum Window Sum — Medium
- Median Value — Medium
- Rotate Array Left — Medium
- Rotate Array Right — Medium
- Count Pairs With Sum — Medium
- Heaviest Row — Medium