Minimum Sum of Mountain Triplets II
Treat each index as the peak j; take the smallest valid value on its left and its suffix minimum on the right.
Treat each index as the peak j; take the smallest valid value on its left and its suffix minimum on the right.