Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,17 @@
function countingSort(sequence array, integer mina, maxa)
sequence count = repeat(0,maxa-mina+1)
for i=1 to length(array) do
count[array[i]-mina+1] += 1
end for
integer z = 1
for i=mina to maxa do
for j=1 to count[i-mina+1] do
array[z] := i
z += 1
end for
end for
return array
end function
sequence s = {5, 3, 1, 7, 4, 1, 1, 20}
?countingSort(s,min(s),max(s))