Sorting algorithms/Bubble sort: Difference between revisions

Content added Content deleted
Line 3,018: Line 3,018:
Dim sortable() As Integer ' assume the array is populated
Dim sortable() As Integer ' assume the array is populated
sortable.Shuffle() ' sortable is now randomized
sortable.Shuffle() ' sortable is now randomized
Dim swapped As Boolean
Do
Do
Dim swapped As Boolean
Dim index, bound As Integer
Dim index, bound As Integer
bound = sortable.Ubound
bound = sortable.Ubound