Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
scs :: Eq a => [a] -> [a] -> [a]
|
||||
scs [] ys = ys
|
||||
scs xs [] = xs
|
||||
scs xss@(x:xs) yss@(y:ys)
|
||||
| x == y = x : scs xs ys
|
||||
| otherwise = ws
|
||||
where
|
||||
us = scs xs yss
|
||||
vs = scs xss ys
|
||||
ws | length us < length vs = x : us
|
||||
| otherwise = y : vs
|
||||
|
||||
main = putStrLn $ scs "abcbdab" "bdcaba"
|
||||
Loading…
Add table
Add a link
Reference in a new issue