Problem 2908 · Easy

Minimum Sum of Mountain Triplets I

Treat each middle index as a peak, take the smallest smaller value on each side, and keep the best total.

Open the interactive visualisation