Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
|
|
@ -0,0 +1,20 @@
|
|||
Dim sortable() As Integer ' assume the array is populated
|
||||
sortable.Shuffle() ' sortable is now randomized
|
||||
Do
|
||||
Dim swapped As Boolean
|
||||
Dim index, bound As Integer
|
||||
bound = sortable.Ubound
|
||||
|
||||
While index < bound
|
||||
If Sortable(index) > Sortable(index + 1) Then
|
||||
Dim s As Integer = Sortable(index)
|
||||
Sortable.Remove(index)
|
||||
Sortable.Insert(index + 1, s)
|
||||
swapped = True
|
||||
End If
|
||||
index = index + 1
|
||||
Wend
|
||||
|
||||
If not swapped Then Exit Do
|
||||
Loop
|
||||
'sortable is now sorted
|
||||
Loading…
Add table
Add a link
Reference in a new issue