Home > Back-end >  Bubble sort what is wrong?
Bubble sort what is wrong?

Time:02-27



Bubble sort problems

On the third sorting result is?

I choose to 15,25,26...

What is wrong?

The first trip gave to the smallest 15
The second trip gave to minor 25

This every day?

CodePudding user response:

The
refer to the original poster sweetswing response:

bubble sort problems
On the third sorting result is?

I choose to 15,25,26...

What is wrong?

The first trip gave to the smallest 15
The second trip gave to minor 25

This every day?


You are too lazy to guess the answer is wrong, so in general the bubbling is first out of large number, the answer you out first decimal is also wrong, himself a bit to know,

CodePudding user response:


Total number of calculations are performed several trips to N - 1, you see the figure
  • Related