版本 3c795432399a23f7497a27b20c78e2c920ad5f5c
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’