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 19 of 22
Question 13 of 14
Step 19 of 22
Step 20 of 22
Step 21 of 22
Question 13 of 14
Question 13 of 14
Right.
You guessed: At 50, the two sides differ by one level at most.
What the run did:
At 50, the left side is one level high and the right side empty, so it is balanced.
Question 13 of 14
Not this time.
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 one level high and the right side empty, so it is balanced.
Question 14 of 14
Question 14 of 14
Right.
You guessed: At 60, the two sides differ by one level at most.
What the run did:
At 60, the left side is 2 levels high and the right side one level high, so it is balanced.
That is every question on this run: 1 of 14 right.
Question 14 of 14
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 2 levels high and the right side one level high, so it is balanced.
That is every question on this run: 0 of 14 right.