guess the next step: Cocktail shaker sort
Before each step plays, guess what it does. The page then shows the step as the run takes it and says why, the same sentence the watch page says there.
Step 12 of 45
Question 7 of 30
Step 12 of 45
Step 13 of 45
Step 14 of 45
Step 15 of 45
Step 16 of 45
Step 17 of 45
Step 18 of 45
Step 19 of 45
Step 20 of 45
Step 21 of 45
Question 7 of 30
Question 7 of 30
Right.
You guessed: 56 is bigger than 49, so they swap.
What the run did:
56 is bigger than 49, so they are the wrong way round.
Question 7 of 30
Not this time.
You guessed: 56 is not bigger than 49, so they stay.
What the run did:
56 is bigger than 49, so they are the wrong way round.
Question 8 of 30
Question 8 of 30
Right.
You guessed: The biggest number left settles at the right end.
What the run did:
56 is now at the right end of the unsorted part. Nothing bigger is left, so it stays there for good.
Question 8 of 30
Not this time.
You guessed: The smallest number left settles at the left end.
What the run did:
56 is now at the right end of the unsorted part. Nothing bigger is left, so it stays there for good.
Question 8 of 30
Not this time.
You guessed: Everything left is already in order.
What the run did:
56 is now at the right end of the unsorted part. Nothing bigger is left, so it stays there for good.
Question 9 of 30
Question 9 of 30
Not this time.
You guessed: 12 is bigger than 49, so they swap.
What the run did:
12 is not bigger than 49, so they stay as they are.
Question 9 of 30
Right.
You guessed: 12 is not bigger than 49, so they stay.
What the run did:
12 is not bigger than 49, so they stay as they are.
Question 10 of 30
Question 10 of 30
Right.
You guessed: 23 is bigger than 12, so they swap.
What the run did:
23 is bigger than 12, so they are the wrong way round.
Question 10 of 30
Not this time.
You guessed: 23 is not bigger than 12, so they stay.
What the run did:
23 is bigger than 12, so they are the wrong way round.
Question 11 of 30
Question 11 of 30
Right.
You guessed: 42 is bigger than 12, so they swap.
What the run did:
42 is bigger than 12, so they are the wrong way round.
Question 11 of 30
Not this time.
You guessed: 42 is not bigger than 12, so they stay.
What the run did:
42 is bigger than 12, so they are the wrong way round.
Question 12 of 30
Question 12 of 30
Right.
You guessed: 18 is bigger than 12, so they swap.
What the run did:
18 is bigger than 12, so they are the wrong way round.
Question 12 of 30
Not this time.
You guessed: 18 is not bigger than 12, so they stay.
What the run did:
18 is bigger than 12, so they are the wrong way round.