2 D array of list<char> both static and dynamic

Can someone help me out with defining 2D array of lists.
Given a string I was asked to print longest palindrome subsequence. I could print length using dynamic programming, but in order to print the actual longest palindrome subsequence I am still maintaining dp array in which I store calculated results.

Simply put previously dp[i][j](longest palindrome subsequence from index i to j) was length now it is actual string.multiple concatenations to string make the program slow. So I thought of list<char>. So now dp[i][j] is list<char>.
Topic archived. No new replies allowed.