DP, Palindromes, Path Recovery