Topic: Dynamic Programming Problem / Level: intermediate

Problem: Compute the longest subsequence where adjacent elements in an array differ by exactly k using dynamic programming.

Run the code to see the output here...