in reply to Longest Common SubSequence Not Working Correctly
The runtime of the subroutine isn't that big.
Update:
Change the testing part at the bottom to read:
Run time:my $a = "abbacbacccabbacbacccccccccccgcccc"; my $b = "aabaabcbavcvcbvbvnbmhgfdgf"; print "LCS: ", lcs($a, $b), "\n\n";
real 0m0.043s user 0m0.039s sys 0m0.002s
|
|---|