版本 ec2567bfe63e17dfb9e0084a969e71157e5f5380
acm/course/LCS
Define
-
Find a
sub-sequence
of 2 given sequences in which the sub-sequence’s elements are appear in both original sequences and the sub-sequence is as long as possible.
-
ex: ‘aabbcc’, ‘abbccc’ => ‘abc’
-
– The LCS of S1[1…i] and S2[1…j].
-
– i.e. LCS[i][j]
-
– Find the previous number with longest LIS.
-
– LCS[i][j]:
-
ex: ‘CBABCABCC’ , ‘ABCABCBA’ => ABCABC