After the first pass, the largest number is guaranteed to be in the highest-numbered element
of the array; after the second pass, the two highest numbers are “in place,” and
so on. Instead of making nine comparisons on every pass, modify the bubble sort to
make eight comparisons on the second pass, seven on the third pass and so on.
Cho hỏi làm vậy có đúng yêu cầu chưa các bác??


83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?