guess the next step: Quick 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 32 of 52
Question 25 of 35
Step 32 of 52
Step 33 of 52
Step 34 of 52
Step 36 of 52
Step 37 of 52
Step 38 of 52
Step 39 of 52
Step 40 of 52
Question 25 of 35
Question 25 of 35
Not this time.
You guessed: 18 is smaller than the pivot 49, so it swaps onto the small side.
What the run did:
18 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 25 of 35
Right.
You guessed: 18 is smaller than the pivot 49, and already stands at the end of the small side.
What the run did:
18 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 25 of 35
Not this time.
You guessed: 18 is not smaller than the pivot 49, so it stays on the big side.
What the run did:
18 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 26 of 35
Question 26 of 35
Not this time.
You guessed: The pivot swaps in just after the small side.
What the run did:
The pivot 49 already stands just after the small side, so it stays there for good.
Question 26 of 35
Right.
You guessed: The pivot already stands just after the small side.
What the run did:
The pivot 49 already stands just after the small side, so it stays there for good.
Question 27 of 35
Question 27 of 35
Not this time.
You guessed: 42 is smaller than the pivot 18, so it swaps onto the small side.
What the run did:
42 is not smaller than the pivot 18, so it stays on the big side.
Question 27 of 35
Not this time.
You guessed: 42 is smaller than the pivot 18, and already stands at the end of the small side.
What the run did:
42 is not smaller than the pivot 18, so it stays on the big side.
Question 27 of 35
Right.
You guessed: 42 is not smaller than the pivot 18, so it stays on the big side.
What the run did:
42 is not smaller than the pivot 18, so it stays on the big side.
Question 28 of 35
Question 28 of 35
Not this time.
You guessed: 31 is smaller than the pivot 18, so it swaps onto the small side.
What the run did:
31 is not smaller than the pivot 18, so it stays on the big side.
Question 28 of 35
Not this time.
You guessed: 31 is smaller than the pivot 18, and already stands at the end of the small side.
What the run did:
31 is not smaller than the pivot 18, so it stays on the big side.
Question 28 of 35
Right.
You guessed: 31 is not smaller than the pivot 18, so it stays on the big side.
What the run did:
31 is not smaller than the pivot 18, so it stays on the big side.
Question 29 of 35
Question 29 of 35
Not this time.
You guessed: 23 is smaller than the pivot 18, so it swaps onto the small side.
What the run did:
23 is not smaller than the pivot 18, so it stays on the big side.
Question 29 of 35
Not this time.
You guessed: 23 is smaller than the pivot 18, and already stands at the end of the small side.
What the run did:
23 is not smaller than the pivot 18, so it stays on the big side.
Question 29 of 35
Right.
You guessed: 23 is not smaller than the pivot 18, so it stays on the big side.
What the run did:
23 is not smaller than the pivot 18, so it stays on the big side.
Question 30 of 35
Question 30 of 35
Right.
You guessed: The pivot swaps in just after the small side.
What the run did:
Swap the pivot 18 in just after the small side. Nothing to its left is bigger and nothing to its right is smaller, so it stays there for good.
Question 30 of 35
Not this time.
You guessed: The pivot already stands just after the small side.
What the run did:
Swap the pivot 18 in just after the small side. Nothing to its left is bigger and nothing to its right is smaller, so it stays there for good.