Problem 3916 · Hard

Number of ZigZag Arrays III

Count arrays whose neighbours differ and whose steps alternate up and down, tracking the last step for every value.

Open the interactive visualisation