Topic: Dynamic Programming Problem / Level: beginner

Problem: Find the longest subsequence in an array where the difference between adjacent elements is at most k.

Run the code to see the output here...