Topic: Dynamic Programming Problem / Level: intermediate

Problem: Find the longest palindromic subsequence where adjacent characters are distinct using dynamic programming.

Run the code to see the output here...