second type of bubble sort