Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,38 @@
'randomize 0.5
itemCount = 20
dim item(itemCount)
for i = 1 to itemCount
item(i) = int(rnd(1) * 100)
next i
print "Before Sort"
for i = 1 to itemCount
print item(i)
next i
print: print
't0=time$("ms")
gap=itemCount
while gap>1 or swaps <> 0
gap=int(gap/1.25)
'if gap = 10 or gap = 9 then gap = 11 'uncomment to get Combsort11
if gap <1 then gap = 1
i = 1
swaps = 0
for i = 1 to itemCount-gap
if item(i) > item(i + gap) then
temp = item(i)
item(i) = item(i + gap)
item(i + gap) = temp
swaps = 1
end if
next
wend
print "After Sort"
't1=time$("ms")
'print t1-t0
for i = 1 to itemCount
print item(i)
next i
end