Its faster than BozoSort lmao Anyways press space to start Most of them under like 140 to 150 finish in like 0-1 seconds so have fun 1000 element list sorts in just about a minute
So you wanna know how bubble sort works? Ok, so take the list [6,1,2,4,3,5]. How do you tell a computer to sort this into [1,2,3,4,5,6]? BubbleSort says: Take the first two elements, 6 and 1. 6>1, so swap them. Now the list is [1,6,2,4,3,5]. The next two elements are 6 and 2, and 6>2, so swap them. Now the list is [1,2,6,4,3,5]. See the pattern? Keep going until you reach the last two items. By then, the list will become [1,2,4,3,5,6]. Then start over, checking 1 and 2: 1<2, just move on. 2<4, move on. 4>3, so swap --> [1,2,3,4,5,6]. Ur done :). Also notice that the largest unsorted number will always end up getting carried to the correct spot. For instance, in the list [10,9,8,...,3,2,1], 10 must end up at the top in the first iteration because it is unsorted, then 9, then 8, then 7, ..., until only 1 and 2 are left, and they will be swapped. BubaShirt