# Further Maths - Shuttlesort

## Flashcards

After 3 passes with shuttlesort, what must be true?

The first three numbers are in the correct position.

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

\[n - 1\]

What is the worst case time complexity of shuttlesort?

\[O(n^2)\]

When can you prematurely stop doing passes for shuttlesort?

You can’t, you have to do $n-1$ passes.

When can you move to the next pass for shuttlesort?

When you make a comparison with no swap.

What’s next?

If you make a swap during a pass of shuttlesort, what do you now have to do?

Move through all the previous numbers and see if a swap could be made.

## \[2 4 (6 1) 9\]
After this swap is made for shuttlesort, what must be done?

Go through the rest of the previous numbers and see if any swaps can be made.