Section 10.1 starter
sortingObjectives
Implement a bubblesort algorithm
Consider bubblesort’s efficiency, pros, and cons
Bubblesort is a simple sorting algorithm that iterates sequentially through elements of an array and compares the current item with the one behind it, and either swaps them or continues, repeating until there are no more swaps needed. This results in items "bubbling" to the top of the list.
Draw a pretty picture for here
Subsection 10.1.1
For this exercise, complete the bubblesort algorithm:
Create a nested loop to iterate through each item in the array
Compare the current item with the next one, and swap the position as needed
You have attempted
of
activities on this page.