# Further Maths - Shuttlesort

> Source: https://ollybritton.com/notes/a-level/further-maths/topics/shuttlesort/ · Updated: 2021-10-12 · Tags: school, decision, further-maths

## 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.

##### ![PHOTO SHUTTLESORT 1](shuttlesort-1.png) What's next??
![PHOTO SHUTTLESORT 2](shuttlesort-2.png)

##### 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.

---
Olly Britton — https://ollybritton.com. Machine-readable index: https://ollybritton.com/llms.txt
