leetcode

5. Longest Palindromic Substring

Solution code: Center expanding

Time complexity: O(n^2)

Space complexity: O(1)

Solution code: Dynamic Programming

Time complexity: O(n^2)

Space complexity: O(n^2)