1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00

remove examples

This commit is contained in:
schaeff 2021-06-29 22:37:15 +02:00
parent f00966a433
commit 1a3fa5630c
2 changed files with 0 additions and 18 deletions

View file

@ -1,2 +0,0 @@
def main(field[3][2] a, u32 index) -> field[2]:
return a[index]

View file

@ -1,16 +0,0 @@
def swap(u32 a, u32 b, bool c) -> (u32, u32):
u32 a_prime = if c then b else a fi
b = if c then a else b fi
return a_prime, b
def bubblesort<N>(u32[N] a) -> u32[N]:
for u32 i in 0..(N-1) do
for u32 j in 0..(N-1-i) do
bool need_swap = a[j + 1] < a[j]
a[j], a[j + 1] = swap(a[j], a[j + 1], need_swap)
endfor
endfor
return a
def main(u32[2] a) -> u32[2]:
return bubblesort(a)