Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
F shell_sort(&seq)
|
||||
V inc = seq.len I/ 2
|
||||
L inc != 0
|
||||
L(el) seq[inc..]
|
||||
V i = L.index + inc
|
||||
L i >= inc & seq[i - inc] > el
|
||||
seq[i] = seq[i - inc]
|
||||
i -= inc
|
||||
seq[i] = el
|
||||
inc = I inc == 2 {1} E inc * 5 I/ 11
|
||||
|
||||
V data = [22, 7, 2, -5, 8, 4]
|
||||
shell_sort(&data)
|
||||
print(data)
|
||||
Loading…
Add table
Add a link
Reference in a new issue