update isPalindrome dp solution to Ex1