Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,15 @@
function lcs(s1::AbstractString, s2::AbstractString)::String
l, r, sub_len = 1, 0, 0
for i in eachindex(s1)
for j in i:length(s1)
contains(s2, SubString(s1, i, j)) || break
if sub_len ≤ j - i
l, r = i, j
sub_len = j - i
end
end
end
return s1[l:r]
end
@show lcs("thisisatest", "testing123testing")