Help in a string problem.

Правка en2, от 444iq, 2019-10-25 11:04:08

How to approach this problem. My approach was to find the prfix from 0 to i and suffix from n — 1 to i + 1. concatenate both for a new string and find longest palindromic subsequence for the current string. But it gave wrong answer and later I realized that my approach will not work always.

Any other approach for this problem. The tag was dp for the problem.

Thanks.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский 444iq 2019-10-25 11:04:08 32 Tiny change: ' problem. \n\nThanks' -> ' problem. The tag was dp for the problem.\n\nThanks'
en1 Английский 444iq 2019-10-25 10:52:54 454 Initial revision (published)