Problem 3640 · Hard
Track the best rising, falling and final-rising runs ending at each index, so a trionic sum is built in one pass.
Open the interactive visualisation