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,13 @@
|
|||
proc bubbleSort[T](a: var openarray[T]) =
|
||||
var t = true
|
||||
for n in countdown(a.len-2, 0):
|
||||
if not t: break
|
||||
t = false
|
||||
for j in 0..n:
|
||||
if a[j] <= a[j+1]: continue
|
||||
swap a[j], a[j+1]
|
||||
t = true
|
||||
|
||||
var a = @[4, 65, 2, -31, 0, 99, 2, 83, 782]
|
||||
bubbleSort a
|
||||
echo a
|
||||
Loading…
Add table
Add a link
Reference in a new issue