Homework Assignment

Balanced Search Trees

Contents:


Overview

Topic: Balanced Search Trees
Related Reading: Ch. 10.1, 10.2
Due:

Please make sure you adhere to the policies on academic integrity.


Problems to be Submitted (20 points)

  1. (5 points)

    Using a standard binary search tree (i.e., without any rebalancing operations), draw the final tree that results after the following sequence of insertions: 30, 40, 24, 58, 48, 26, 11, 13.

  2. (5 points)

    Draw the final AVL tree that results after inserting the sequence of elements 10, 20, 30, 40, 50, 60, in that order.

    Just above each node of your drawing, provide an annotation of the height of the subtree rooted at that node, using a convention that a node with two null children has height 1 (i.e., in this example, immediately after 10 is inserted, the root of the tree has height 1).

  3. (5 points)

    Continuing where you left off with the preceding problem, show the final result after the additional insertions 70, 80, 90, 100.

    Just above each node of your drawing, provide an annotation of the height of the subtree rooted at that node, using a convention that a node with two null children has height 1.

  4. (5 points)

    Draw the AVL tree that results from the deletion of value 15 from the following AVL tree

    Just above each node of your drawing, provide an annotation of the height of the subtree rooted at that node, using a convention that a node with two null children has height 1.


Last modified: Monday, 30 November 2015