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