CPSC 327 Data Structures and Algorithms Spring 2024

Homework 5
due Wed 2/7 in class

Draw the tree resulting from each insertion/removal step. If swaps are needed, swap the element with its successor.

  1. Insert the elements 6, 25, 73, 18, 1, 19, 40 into an initially-empty AVL tree.

  2. Remove the elements 12, 5, 40, 93 from the AVL tree shown.