Longest Palindrome — Dynamic Programming O(n²)

Build a DP table bottom-up. For each pair (j, i), check if the outer characters match and the inner substring is already a palindrome.

0 / 0
dp table — dp[j][i] = substring s[j..i] is palindrome
base case
checking
inner lookup
palindrome
not palindrome
Current substring
Best palindrome
prev   next   Space play/pause   R reset   S skip to match