Topic: Dynamic Programming Problem / Level: intermediate

Problem: Compute the longest subsequence where the difference between adjacent elements is exactly 1 using dynamic programming.

Run the code to see the output here...