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 16 of 52
Question 13 of 35
Step 16 of 52
Step 17 of 52
Step 18 of 52
Step 19 of 52
Step 21 of 52
Step 22 of 52
Step 23 of 52
Step 24 of 52
Question 13 of 35
Question 13 of 35
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 13 of 35
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 13 of 35
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 14 of 35
Question 14 of 35
Not this time.
You guessed: 12 is smaller than the pivot 56, so it swaps onto the small side.
What the run did:
12 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 14 of 35
Right.
You guessed: 12 is smaller than the pivot 56, and already stands at the end of the small side.
What the run did:
12 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 14 of 35
Not this time.
You guessed: 12 is not smaller than the pivot 56, so it stays on the big side.
What the run did:
12 is smaller than the pivot 56, and it already stands at the end of the small side.
Question 15 of 35
Question 15 of 35
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 15 of 35
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 16 of 35
Question 16 of 35
Not this time.
You guessed: 49 is smaller than the pivot 12, so it swaps onto the small side.
What the run did:
49 is not smaller than the pivot 12, so it stays on the big side.
Question 16 of 35
Not this time.
You guessed: 49 is smaller than the pivot 12, and already stands at the end of the small side.
What the run did:
49 is not smaller than the pivot 12, so it stays on the big side.
Question 16 of 35
Right.
You guessed: 49 is not smaller than the pivot 12, so it stays on the big side.
What the run did:
49 is not smaller than the pivot 12, so it stays on the big side.
Question 17 of 35
Question 17 of 35
Not this time.
You guessed: 42 is smaller than the pivot 12, so it swaps onto the small side.
What the run did:
42 is not smaller than the pivot 12, so it stays on the big side.
Question 17 of 35
Not this time.
You guessed: 42 is smaller than the pivot 12, and already stands at the end of the small side.
What the run did:
42 is not smaller than the pivot 12, so it stays on the big side.
Question 17 of 35
Right.
You guessed: 42 is not smaller than the pivot 12, so it stays on the big side.
What the run did:
42 is not smaller than the pivot 12, so it stays on the big side.
Question 18 of 35
Question 18 of 35
Not this time.
You guessed: 31 is smaller than the pivot 12, so it swaps onto the small side.
What the run did:
31 is not smaller than the pivot 12, so it stays on the big side.
Question 18 of 35
Not this time.
You guessed: 31 is smaller than the pivot 12, and already stands at the end of the small side.
What the run did:
31 is not smaller than the pivot 12, so it stays on the big side.
Question 18 of 35
Right.
You guessed: 31 is not smaller than the pivot 12, so it stays on the big side.
What the run did:
31 is not smaller than the pivot 12, so it stays on the big side.