Topic: Dynamic Programming Problem / Level: intermediate

Problem: Compute the longest subsequence in an array where the difference between adjacent elements is exactly k using dynamic programming.

Run the code to see the output here...