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 16 of 59
Question 13 of 42
Step 16 of 59
Step 17 of 59
Step 18 of 59
Step 19 of 59
Step 20 of 59
Step 21 of 59
Step 23 of 59
Step 24 of 59
Question 13 of 42
Question 13 of 42
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 13 of 42
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 13 of 42
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 14 of 42
Question 14 of 42
Not this time.
You guessed: 31 is smaller than the pivot 49, so it swaps onto the small side.
What the run did:
31 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 14 of 42
Right.
You guessed: 31 is smaller than the pivot 49, and already stands at the end of the small side.
What the run did:
31 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 14 of 42
Not this time.
You guessed: 31 is not smaller than the pivot 49, so it stays on the big side.
What the run did:
31 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 15 of 42
Question 15 of 42
Not this time.
You guessed: 7 is smaller than the pivot 49, so it swaps onto the small side.
What the run did:
7 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 15 of 42
Right.
You guessed: 7 is smaller than the pivot 49, and already stands at the end of the small side.
What the run did:
7 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 15 of 42
Not this time.
You guessed: 7 is not smaller than the pivot 49, so it stays on the big side.
What the run did:
7 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 16 of 42
Question 16 of 42
Not this time.
You guessed: 23 is smaller than the pivot 49, so it swaps onto the small side.
What the run did:
23 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 16 of 42
Right.
You guessed: 23 is smaller than the pivot 49, and already stands at the end of the small side.
What the run did:
23 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 16 of 42
Not this time.
You guessed: 23 is not smaller than the pivot 49, so it stays on the big side.
What the run did:
23 is smaller than the pivot 49, and it already stands at the end of the small side.
Question 17 of 42
Question 17 of 42
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 17 of 42
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 18 of 42
Question 18 of 42
Right.
You guessed: 7, the pivot, swaps to the end of the part.
What the run did:
Swap the pivot 7 to the end of the part, out of the way, and 23 goes where 7 was.
Question 18 of 42
Not this time.
You guessed: 7, the pivot, already stands at the end of the part.
What the run did:
Swap the pivot 7 to the end of the part, out of the way, and 23 goes where 7 was.