Your method would fail for
S1 = aabbb S2 = aabbb S3 = aa
The answer is "aa", but your method will try to find the LCS("bbb", "aa") and will fail to find a result.
Update: Oops, I meant
S1 = aa1bbb S2 = aa2bbb S3 = aa
In reply to Re: Longest Common Subsequence Question
by ikegami
in thread Longest Common Subsequence Question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |