# coding:utf-8
__author__ = 'taohao'
"""
bubble sort
"""
def bubble_sort(array):
i = j = 0
length = len(array)
while i < length-1:
while j < length-i-1:
if array[j] > array[j+1]:
tem = array[j]
array[j] = array[j+1]
array[j+1] = tem
j += 1
j = 0
i += 1
if __name__ == "__main__":
array = [19, 3, 6, 99, 80, 39, 4, 2, 27, 50, 6, 75, 201, 98, 28, 91]
bubble_sort(array)
print array