Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
PRINT FNlcs("1234", "1224533324")
|
||||
PRINT FNlcs("thisisatest", "testing123testing")
|
||||
END
|
||||
|
||||
DEF FNlcs(a$, b$)
|
||||
IF a$="" OR b$="" THEN = ""
|
||||
IF RIGHT$(a$) = RIGHT$(b$) THEN = FNlcs(LEFT$(a$), LEFT$(b$)) + RIGHT$(a$)
|
||||
LOCAL x$, y$
|
||||
x$ = FNlcs(a$, LEFT$(b$))
|
||||
y$ = FNlcs(LEFT$(a$), b$)
|
||||
IF LEN(y$) > LEN(x$) SWAP x$,y$
|
||||
= x$
|
||||
Loading…
Add table
Add a link
Reference in a new issue