Further Maths - Bubblesort


Flashcards

After 3 passes with bubblesort, what must be true?


The last three numbers are in the correct position.

What’s the most amount of passes for $n$ numbers that will be needed in bubblesort?


\[n - 1\]

#

What is the worst case time complexity of bubblesort?


\[n^2\]



Related posts