Longest common substring: Difference between revisions

A
(easylang)
(A)
Line 2,246:
main()
</syntaxhighlight>
<pre>test</pre>
 
=={{header|Quackery}}==
 
<syntaxhighlight lang="Quackery"> [ 0 temp put
0 temp put
tuck dup size times
[ 2dup swap
0 temp put
0 swap witheach
[ unrot
over size
over = iff
[ drop
conclude ]
done
rot dip
[ 2dup peek ]
= tuck * +
dup temp take
max temp put ]
2drop
temp take
dup temp share > iff
[ temp release
temp release
i^ temp put
temp put ]
else drop
behead drop ]
2drop
temp take dip
[ temp take split nip ]
split drop ] is lcs ( $ $ --> $ )
 
$ "thisisatest" $ "testing123testing" lcs echo$ cr</syntaxhighlight>
 
{{out}}
 
<pre>test</pre>
 
1,462

edits