Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
declare
|
||||
fun {LCS Xs Ys}
|
||||
case [Xs Ys]
|
||||
of [nil _] then nil
|
||||
[] [_ nil] then nil
|
||||
[] [X|Xr Y|Yr] andthen X==Y then X|{LCS Xr Yr}
|
||||
[] [_|Xr _|Yr] then {Longest {LCS Xs Yr} {LCS Xr Ys}}
|
||||
end
|
||||
end
|
||||
|
||||
fun {Longest Xs Ys}
|
||||
if {Length Xs} > {Length Ys} then Xs else Ys end
|
||||
end
|
||||
in
|
||||
{System.showInfo {LCS "thisisatest" "testing123testing"}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue