What is the lenght of largest common subsequence of two round words? In a round word there is no difference from which symbol the word starts and in which direction it is read.
lcs("algorithm", "grammar") = "grma"
1≤N≤2000
http://izho.kz/uploads/izho_2013_en_inform.pdf
Do you have any solutions? Thanks for help.
Second table Y can be found by the same DP like first one, but for reversed strings a and b.
UPD: "Beware of bugs in the above code; I have only proved it correct, not tried it". Donald Knuth(c)
there are at least two bugs: lcm — lcs, min — max.
Nice LCS implementation bro
as i understood it just calculates lcs(n, m)
BTW it's max bro
It's simply calculate the lcs of two strings. Nice prove bro, nice prove
Idea of my solution was wrong? Thanks for your ribbing and -16 for my help.
It's simply calculate the lcs :(
Maybe this could help you :D
Thanks, I didn't think to Google it :D