def bubbleSort(arr):
    arrayLength = len(arr)

    #traversing through entire array
    for i in range(1,arrayLength):        
        for index in range(0,arrayLength-1):
            if( arr[index] < arr[index-1]):
                arr[index+1],arr[index] = arr[jindex,arr[index+1]
    return arr                
