DP



Leetcode 516
construct a 2 dimensional array, dp[j][i] which hold the max length of palindromic substring from i to j, then inside the inner loop, start with i-1, remember to take care of the case where j=i-1

Comments

Popular Posts