Problem 2210 · Easy

Count Hills and Valleys in an Array

Count hills and valleys while treating adjacent equal values as one plateau.

Open the interactive visualisation