Longest common subsequence: Difference between revisions
m
→Bit Vector: fiddle with sigils and layout
(→{{header|Picat}}: Split into subsections. Added {{out}}) |
SqrtNegInf (talk | contribs) m (→Bit Vector: fiddle with sigils and layout) |
||
Line 2,667:
Bit parallel dynamic programming with nearly linear complexity O(n). It is fast.
<lang perl6>sub lcs(Str $xstr, Str $ystr) {
my (
my (%positions, @Vs, $lcs);
my $S = +^ 0;
my
$u = $S +& $y;▼
}
my ($i, $j) =
while ($i ≥ 0 and $j ≥ 0) {
}
}
}
|