guess the next step: AVL tree
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 38 of 45
Question 31 of 36
Step 38 of 45
Step 39 of 45
Step 40 of 45
Step 41 of 45
Step 42 of 45
Step 43 of 45
Step 44 of 45
Question 31 of 36
Question 31 of 36
Not this time.
You guessed: 70 is smaller than 50, so go left.
What the run did:
70 is bigger than 50, so go right.
Question 31 of 36
Right.
You guessed: 70 is bigger than 50, so go right.
What the run did:
70 is bigger than 50, so go right.
Question 32 of 36
Question 32 of 36
Not this time.
You guessed: 70 is smaller than 60, so go left.
What the run did:
70 is bigger than 60, so go right.
Question 32 of 36
Right.
You guessed: 70 is bigger than 60, so go right.
What the run did:
70 is bigger than 60, so go right.
Question 33 of 36
Question 33 of 36
Not this time.
You guessed: Hang 70 to the left of 60.
What the run did:
The way runs out, so hang 70 to the right of 60.
Question 33 of 36
Right.
You guessed: Hang 70 to the right of 60.
What the run did:
The way runs out, so hang 70 to the right of 60.
Question 34 of 36
Question 34 of 36
Right.
You guessed: At 60, the two sides differ by one level at most.
What the run did:
At 60, the left side is empty and the right side one level high, so it is balanced.
Question 34 of 36
Not this time.
You guessed: At 60, one side is two levels higher, so the tree must turn.
What the run did:
At 60, the left side is empty and the right side one level high, so it is balanced.
Question 35 of 36
Question 35 of 36
Not this time.
You guessed: At 50, the two sides differ by one level at most.
What the run did:
At 50, the left side is empty and the right side 2 levels high: two levels apart, so the tree must turn.
Question 35 of 36
Right.
You guessed: At 50, one side is two levels higher, so the tree must turn.
What the run did:
At 50, the left side is empty and the right side 2 levels high: two levels apart, so the tree must turn.
Question 36 of 36
Question 36 of 36
Right.
You guessed: Turn left at 50.
What the run did:
Turn left at 50: 60 moves up into its place, and 50 hangs to its left.
That is every question on this run: 1 of 36 right.
Question 36 of 36
Not this time.
You guessed: Turn right at 50.
What the run did:
Turn left at 50: 60 moves up into its place, and 50 hangs to its left.
That is every question on this run: 0 of 36 right.