leetcode icon indicating copy to clipboard operation
leetcode copied to clipboard

1-D Dynamic Programming Palindromic Substrings (0647) should be identified as 2-D DP or Two Pointers problem

Open zxg93 opened this issue 2 years ago • 0 comments

We solved the problem in non-DP way using the nested loops with Two Pointers. But if someone were to using DP to solve it, the solution would be in O(N^2) time complexity and more O(N^2) space complexity. So it is not 1-D DP problem in neither ways.

zxg93 avatar Apr 17 '23 16:04 zxg93