Longest common subsequence: Difference between revisions

m
(jq)
Line 1,158:
 
=={{header|jq}}==
We first give a recursive solution, and then use it to write aan fasterenhanced solution that first removes extraneous characters and recognizes a common initial substring.<lang jq>
def recursive_lcs(a; b):
if (a|length) == 0 or (b|length) == 0 then ""
Line 1,220:
user 0m0.427s
sys 0m0.005s</lang>
 
=={{header|Liberty BASIC}}==
<lang lb>
2,451

edits