I wrote a DP solution O(N^2) time complexity and seeing constraints
10^3
my solution still giving TLE can u plz help me in correction.
I know can be solved using LCS OF REVERSE OF STRNG AND MAIN STRING
But tell me why my O(n2) solution failed !!!
problem https://leetcode.com/problems/longest-palindromic-subsequence/
My code