Problem 3409 · Medium

Longest Subsequence With Decreasing Adjacent Difference

Track the longest subsequence for each pair of last positions, requiring each new difference to be smaller.

Open the interactive visualisation