# William M. Farmer
# bubble_sort.py
# 23 November 2010

# Sorts a list a of numbers using the bubble sort algorithm.

def bubbleSort(a):
  n = len(a)
  for i in range(n - 1):
    for j in range(n - 1 - i):
      if a[j] > a[j + 1]:
        a[j], a[j + 1] = a[j + 1], a[j]