Can anyone explain how do we find the longest palindromic sub string of in the given string. I know this is the standard DP problem, so please provide the proper DP explanation including overlapping subproblems and optimal substructure, recursive solution and also what do we need to memorize. asked 14 Sep '17, 14:53

Well, if you only want the dp solution, You may refer This article. It explains in detail the basic state, transition and filling up the dp array. But there are better approach for this problem, like here with same time complexity, but improved space complexity here. If you want a really faster approach, like for string with length greater than 1000, you would like to have a look at manacher's algorithm, a linear time algorithm for your prob here. Hope this helps.... Please Upvote if u find this hepful.... answered 14 Sep '17, 21:45
