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 2 of 35
Question 1 of 25
Step 2 of 35
Step 3 of 35
Step 4 of 35
Step 5 of 35
Step 6 of 35
Step 7 of 35
Step 8 of 35
Question 1 of 25
Question 1 of 25
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 1 of 25
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 1 of 25
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.
Question 2 of 25
Question 2 of 25
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 2 of 25
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 2 of 25
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 3 of 25
Question 3 of 25
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 3 of 25
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 3 of 25
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 4 of 25
Question 4 of 25
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 4 of 25
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 4 of 25
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 5 of 25
Question 5 of 25
Not this time.
You guessed: 56 is smaller than the pivot 49, so it swaps onto the small side.
What the run did:
56 is not smaller than the pivot 49, so it stays on the big side.
Question 5 of 25
Not this time.
You guessed: 56 is smaller than the pivot 49, and already stands at the end of the small side.
What the run did:
56 is not smaller than the pivot 49, so it stays on the big side.
Question 5 of 25
Right.
You guessed: 56 is not smaller than the pivot 49, so it stays on the big side.
What the run did:
56 is not smaller than the pivot 49, so it stays on the big side.
Question 6 of 25
Question 6 of 25
Right.
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, so it goes onto the small side.
Question 6 of 25
Not this time.
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, so it goes onto the small side.
Question 6 of 25
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, so it goes onto the small side.