Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
def
|
||||
sort( [] ) = []
|
||||
sort( [x] ) = [x]
|
||||
sort( xs ) =
|
||||
val (l, r) = xs.splitAt( xs.length()\2 )
|
||||
merge( sort(l), sort(r) )
|
||||
|
||||
merge( [], xs ) = xs
|
||||
merge( xs, [] ) = xs
|
||||
merge( x:xs, y:ys )
|
||||
| x <= y = x : merge( xs, y:ys )
|
||||
| otherwise = y : merge( x:xs, ys )
|
||||
|
||||
println( sort([94, 37, 16, 56, 72, 48, 17, 27, 58, 67]) )
|
||||
println( sort(['Sofía', 'Alysha', 'Sophia', 'Maya', 'Emma', 'Olivia', 'Emily']) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue