Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
|
|
@ -14,7 +14,7 @@ func$ lcs a$ b$ .
|
|||
.
|
||||
.
|
||||
.
|
||||
b$ = substr b$ 2 -1
|
||||
b$ = substr b$ 2 9999
|
||||
.
|
||||
return max$
|
||||
.
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ VAR
|
|||
|
||||
S1: string = 'thisisatest' ;
|
||||
|
||||
S2: string = 'testing123isatesting' ;
|
||||
S2: string = 'testing123testing' ;
|
||||
|
||||
|
||||
BEGIN
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
$ENTRY Go {
|
||||
= <Prout <LCS ('thisisatest') 'testing123testing'>>;
|
||||
};
|
||||
|
||||
LCS {
|
||||
(e.X) e.L e.X e.R = e.X;
|
||||
() e.Y = ;
|
||||
e.X e.Y, e.X: (s.L e.XL),
|
||||
e.X: (e.XR s.R)
|
||||
= <Longest (<LCS (e.XL) e.Y>) <LCS (e.XR) e.Y>>;
|
||||
};
|
||||
|
||||
Longest {
|
||||
(e.X) e.Y, <Lenw e.X>: s.LX e.X2,
|
||||
<Lenw e.Y>: s.LY e.Y2,
|
||||
<Compare s.LX s.LY>: '+' = e.X;
|
||||
(e.X) e.Y = e.Y;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue