Problem 2908 · Easy
Treat each middle index as a peak, take the smallest smaller value on each side, and keep the best total.
Open the interactive visualisation