- dynamic programing with
f[i][j] =
whethers[i:j+1]
akas[i]..s[j]
is palindrome or its length - enumerate pivots, and expand from each pivot
- if using dynamic programing, in general
f[i][j] = f[i+1][j-1] || f[i][j-1] || f[i+1]f[j]
(meaning you can either take both end, left only, or right only