Complete bubble sort