Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
(de longestCommonSubstring (Str1 Str2)
|
||||
(setq Str1 (chop Str1) Str2 (chop Str2))
|
||||
(let Res NIL
|
||||
(map
|
||||
'((Lst1)
|
||||
(map
|
||||
'((Lst2)
|
||||
(let Len 0
|
||||
(find
|
||||
'((A B) (nand (= A B) (inc 'Len)))
|
||||
Lst1
|
||||
Lst2 )
|
||||
(when (> Len (length Res))
|
||||
(setq Res (head Len Lst1)) ) ) )
|
||||
Str2 ) )
|
||||
Str1 )
|
||||
(pack Res) ) )
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
: (longestCommonSubstring "thisisatest" "testing123testing")
|
||||
-> "test"
|
||||
Loading…
Add table
Add a link
Reference in a new issue