first version of palindrome2
fast version for palindrome2
optimal version for palindrome2

dynamic programming