Exercises - Lecture 10

10B

Consider the following binary tree:

image-20200825162915273

  1. What is the height of:
  2. What is the balance factor of
  3. In each of the following trees, which node has the balance factor with the largest absolute value?

10C

Here’s the same tree we worked with in #1-2 again. Draw the result of performing each of the following rotations, beginning with the original tree each time.

image-20200825162915273

  1. Left rotate on the node with value 11.

  2. Left rotate on the node with value 15.

  3. Right rotate on the node with value 15.