Topic: Dynamic Programming Problem / Level: intermediate

Problem: Find the longest increasing subsequence where adjacent elements differ by at most 2 using dynamic programming.

Run the code to see the output here...