Khác biệt giữa bản sửa đổi của “Sắp xếp nổi bọt”

Nội dung được xóa Nội dung được thêm vào
Thẻ: Sửa đổi di động Sửa đổi từ trang di động
Dòng 87:
if(unsortedArray[index] > unsortedArray[index+1]) { //Test if need a swap or not.
temp = unsortedArray[index]; //These three lines just swap the two elements:
unsortedArray[index] = unsortedexunsortArray[index+1];
unsortedArray[index+1] = temp;
}