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 @@
|
|||
alist = [7,6,5,9,8,4,3,1,2,0]
|
||||
see insertionsort(alist)
|
||||
|
||||
func insertionsort blist
|
||||
for i = 1 to len(blist)
|
||||
value = blist[i]
|
||||
j = i - 1
|
||||
while j >= 1 and blist[j] > value
|
||||
blist[j+1] = blist[j]
|
||||
j = j - 1
|
||||
end
|
||||
blist[j+1] = value
|
||||
next
|
||||
return blist
|
||||
Loading…
Add table
Add a link
Reference in a new issue