Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
SUB lcs (a$,b$)
|
||||
IF LEN(a$) = 0 OR LEN(b$) = 0 THEN
|
||||
PRINT ""
|
||||
EXIT SUB
|
||||
END IF
|
||||
DO WHILE LEN(b$)<>0
|
||||
FOR j = LEN(b$) TO 1 STEP -1
|
||||
IF POS(a$,(b$)[1:j])<>0 THEN
|
||||
PRINT (b$)[1:j]
|
||||
EXIT SUB
|
||||
END IF
|
||||
NEXT j
|
||||
LET b$ = (b$)[2:maxnum]
|
||||
LOOP
|
||||
END SUB
|
||||
|
||||
CALL lcs ("thisisatest", "testing123testing")
|
||||
END
|
||||
Loading…
Add table
Add a link
Reference in a new issue