guess the next step: Randomised 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 19 of 43
Question 13 of 25
Step 19 of 43
Step 20 of 43
Step 24 of 43
Step 25 of 43
Step 26 of 43
Step 27 of 43
Step 28 of 43
Step 29 of 43
Question 13 of 25
Question 13 of 25
Right.
You guessed: The pivot swaps in just after the small side.
What the run did:
Swap the pivot 12 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 13 of 25
Not this time.
You guessed: The pivot already stands just after the small side.
What the run did:
Swap the pivot 12 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 14 of 25
Question 14 of 25
Right.
You guessed: 56, the pivot, swaps to the end of the part.
What the run did:
Swap the pivot 56 to the end of the part, out of the way, and 42 goes where 56 was.
Question 14 of 25
Not this time.
You guessed: 56, the pivot, already stands at the end of the part.
What the run did:
Swap the pivot 56 to the end of the part, out of the way, and 42 goes where 56 was.
Question 15 of 25
Question 15 of 25
Not this time.
You guessed: 42 is smaller than the pivot 56, so it swaps onto the small side.
What the run did:
42 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 15 of 25
Right.
You guessed: 42 is smaller than the pivot 56, and already stands at the end of the small side.
What the run did:
42 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 15 of 25
Not this time.
You guessed: 42 is not smaller than the pivot 56, so it stays on the big side.
What the run did:
42 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 16 of 25
Question 16 of 25
Not this time.
You guessed: 49 is smaller than the pivot 56, so it swaps onto the small side.
What the run did:
49 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 16 of 25
Right.
You guessed: 49 is smaller than the pivot 56, and already stands at the end of the small side.
What the run did:
49 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 16 of 25
Not this time.
You guessed: 49 is not smaller than the pivot 56, so it stays on the big side.
What the run did:
49 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 17 of 25
Question 17 of 25
Not this time.
You guessed: 31 is smaller than the pivot 56, so it swaps onto the small side.
What the run did:
31 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 17 of 25
Right.
You guessed: 31 is smaller than the pivot 56, and already stands at the end of the small side.
What the run did:
31 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 17 of 25
Not this time.
You guessed: 31 is not smaller than the pivot 56, so it stays on the big side.
What the run did:
31 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 18 of 25
Question 18 of 25
Not this time.
You guessed: The pivot swaps in just after the small side.
What the run did:
The pivot 56 already stands just after the small side, so it stays there for good.
Question 18 of 25
Right.
You guessed: The pivot already stands just after the small side.
What the run did:
The pivot 56 already stands just after the small side, so it stays there for good.