Bubble Sort Algorithm
  • Take the first pair i.e. first and second items.
  • Swap them if they are out of order.
  • Take the next pair (second and third and so on) and repeat step 2.
Once you reach the end, do another pass. Do as many passes as needed to get all the items in order.