Welcome to BubbleSort! BubbleSort is one of the many different algorithms for organizing elements, or values, or strings, or anything in an array or list. How it Works: lets look at a sample of numbers 7 3 5 9 1 BubbleSort starts by comparing the first to values, and checks to see if the first value is bigger than the second. if it is, bubbleSort switches them 7 3 5 9 1 ^ ^ 3 7 5 9 1 ^ ^ 3 5 7 9 1 ^ ^ 3 5 7 9 1 ^ ^ 3 5 7 1 9 every time the algorithm sweeps through the list/array, it moves the largest unsorted element to it's spot in the list/array. eventually, all the elements are sorted.
I HIGHLY RECOMMEND TURBO MODE (Hold Shift and click the green flag) red is the unsorted elements green is elements in their correct spots in the array/list 100% Pen