Ask your own question, for FREE!
Mathematics 6 Online
OpenStudy (amorfide):

When doing Bubble Sort, Do I stop when only one number is left, or do I do another pass going through the set of numbers so that no swaps occur?

OpenStudy (anonymous):

what grade is this?

OpenStudy (amorfide):

A level Further Mathematics. Decision 1 is the unit.

OpenStudy (anonymous):

When the end of the array is reached, the bubble sort algorithm will returns to element one and starts the process all over again. So, when will the bubble sort algorithm stop? The bubble sort algorithm knows when it’s finish when there are no more “swaps”. This can be tracked by the bubble sort algorithm through a so called swap flag.

OpenStudy (amorfide):

so I stop once a pass has no swaps, thank you <3

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
16 hours ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
19 hours ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Arizona: does anyone know the percentage rate of 30,000 and 40,000
1 week ago 0 Replies 0 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!