Problem 941 · Easy

Valid Mountain Array

Decide whether an array rises strictly to a single peak and then falls strictly. The visual draws bars and checks each step's direction.

Open the interactive visualisation