September Morn Update

This commit is contained in:
Ingy döt Net 2019-09-12 10:33:56 -07:00
parent 4e2d22a71d
commit aac6731f2c
6856 changed files with 141342 additions and 21127 deletions

View file

@ -0,0 +1,16 @@
Dim temp, count As Integer
Dim isDirty As Boolean
count = Ubound(list) // count the array size
// loop through until we don't move any numbers... this means we are sorted
Do
isDirty = False // we haven't touched anything yet
For i As Integer = 1 To count - 1 // loop through all the numbers
If list(i) > list(i + 1) Then // if the right number is smaller then the left.. swap
temp = list(i + 1)
list(i + 1) = list(i)
list(i) = temp
isDirty = True // we touched the data so mark it as dirty
End
Next
Loop Until isDirty = False // if we made it without touching the data then we are done