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 38 of 45
Question 25 of 30
Step 38 of 45
Step 39 of 45
Step 40 of 45
Step 41 of 45
Step 42 of 45
Step 43 of 45
Step 44 of 45
Question 25 of 30
Question 25 of 30
Not this time.
You guessed: 12 is bigger than 18, so they swap.
What the run did:
12 is not bigger than 18, so they stay as they are.
Question 25 of 30
Right.
You guessed: 12 is not bigger than 18, so they stay.
What the run did:
12 is not bigger than 18, so they stay as they are.
Question 26 of 30
Question 26 of 30
Not this time.
You guessed: The biggest number left settles at the right end.
What the run did:
12 is now at the left end of the unsorted part. Nothing smaller is left, so it stays there for good.
Question 26 of 30
Right.
You guessed: The smallest number left settles at the left end.
What the run did:
12 is now at the left end of the unsorted part. Nothing smaller is left, so it stays there for good.
Question 26 of 30
Not this time.
You guessed: Everything left is already in order.
What the run did:
12 is now at the left end of the unsorted part. Nothing smaller is left, so it stays there for good.
Question 27 of 30
Question 27 of 30
Not this time.
You guessed: 18 is bigger than 23, so they swap.
What the run did:
18 is not bigger than 23, so they stay as they are.
Question 27 of 30
Right.
You guessed: 18 is not bigger than 23, so they stay.
What the run did:
18 is not bigger than 23, so they stay as they are.
Question 28 of 30
Question 28 of 30
Not this time.
You guessed: 23 is bigger than 31, so they swap.
What the run did:
23 is not bigger than 31, so they stay as they are.
Question 28 of 30
Right.
You guessed: 23 is not bigger than 31, so they stay.
What the run did:
23 is not bigger than 31, so they stay as they are.
Question 29 of 30
Question 29 of 30
Not this time.
You guessed: 31 is bigger than 42, so they swap.
What the run did:
31 is not bigger than 42, so they stay as they are.
Question 29 of 30
Right.
You guessed: 31 is not bigger than 42, so they stay.
What the run did:
31 is not bigger than 42, so they stay as they are.
Question 30 of 30
Question 30 of 30
Not this time.
You guessed: The biggest number left settles at the right end.
What the run did:
That walk swapped nothing, so everything left is already in order.
That is every question on this run: 0 of 30 right.
Question 30 of 30
Not this time.
You guessed: The smallest number left settles at the left end.
What the run did:
That walk swapped nothing, so everything left is already in order.
That is every question on this run: 0 of 30 right.
Question 30 of 30
Right.
You guessed: Everything left is already in order.
What the run did:
That walk swapped nothing, so everything left is already in order.
That is every question on this run: 1 of 30 right.