Leetcode – Longest Palindromic Substring (Java)

Finding the longest palindromic substring is a classic problem of coding interview. This post summarizes 3 different solutions for this problem. 1. Dynamic Programming Let s be the input string, i and j are two indices of the string. Define a 2-dimension array “table” and let table[i][j] denote whether a substring from i to j … Read more