Topic: Dynamic Programming Problem / Level: beginner

Problem: Compute the longest subsequence where the difference between adjacent elements is 1.

Run the code to see the output here...