# LeetCode 5 – Longest Palindromic Substring

#### Posted on December 22, 2013

##### Last updated on December 22, 2013

Solution to LeetCode Longest Palindromic Substring problem.

Let P[i][j] be true iff the substring s[i..j] is a palindrome. The array P can be computed in $$O(n^2)$$ time. Then, we can traverse this array and find the longest palindromic substring.

Markdown SHA1: 18efc30984f4b037d4757accc62a12ba89038c34