Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,31 +0,0 @@
|
|||
sub decr( byref n )
|
||||
n = n - 1
|
||||
end sub
|
||||
|
||||
sub incr( byref n )
|
||||
n = n + 1
|
||||
end sub
|
||||
|
||||
sub swap( byref a, byref b)
|
||||
dim tmp
|
||||
tmp = a
|
||||
a = b
|
||||
b = tmp
|
||||
end sub
|
||||
|
||||
function bubbleSort( a )
|
||||
dim changed
|
||||
dim itemCount
|
||||
itemCount = ubound(a)
|
||||
do
|
||||
changed = false
|
||||
decr itemCount
|
||||
for i = 0 to itemCount
|
||||
if a(i) > a(i+1) then
|
||||
swap a(i), a(i+1)
|
||||
changed = true
|
||||
end if
|
||||
next
|
||||
loop until not changed
|
||||
bubbleSort = a
|
||||
end function
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
dim a
|
||||
a = array( "great eastern", "roe", "stirling", "albany", "leach")
|
||||
wscript.echo join(a,", ")
|
||||
bubbleSort a
|
||||
wscript.echo join(a,", ")
|
||||
Loading…
Add table
Add a link
Reference in a new issue