Skip to main content

Section 10.1 starter

sorting
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:
  1. Create a nested loop to iterate through each item in the array
  2. Compare the current item with the next one, and swap the position as needed
You have attempted of activities on this page.