Problem 3288 · Hard

Length of the Longest Increasing Path

Memoize the longest chain rising from and falling to a fixed point, then join them at that point.

Open the interactive visualisation