guess the next step: Quickselect
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 15 of 21
Question 13 of 17
Step 15 of 21
Step 16 of 21
Step 17 of 21
Step 18 of 21
Step 19 of 21
Step 20 of 21
Question 13 of 17
Question 13 of 17
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 13 of 17
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 13 of 17
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 14 of 17
Question 14 of 17
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 14 of 17
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 14 of 17
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 15 of 17
Question 15 of 17
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 15 of 17
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 15 of 17
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 16 of 17
Question 16 of 17
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, at place 8, where it would stand if the row were in order.
Question 16 of 17
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, at place 8, where it would stand if the row were in order.
Question 17 of 17
Question 17 of 17
Right.
You guessed: The pivot 56 stands at place 8, so it is the number wanted.
What the run did:
The pivot 56 stands at place 8, the place wanted, so it is the number wanted.
That is every question on this run: 1 of 17 right.
Question 17 of 17
Not this time.
You guessed: Place 8 lies to the left of the pivot 56, so keep the left part.
What the run did:
The pivot 56 stands at place 8, the place wanted, so it is the number wanted.
That is every question on this run: 0 of 17 right.
Question 17 of 17
Not this time.
You guessed: Place 8 lies to the right of the pivot 56, so keep the right part.
What the run did:
The pivot 56 stands at place 8, the place wanted, so it is the number wanted.
That is every question on this run: 0 of 17 right.