Homework Two on AVL Trees -

1) Insert the following values, in the order given, into an initially empty AVL tree:

500,600,550,700,800,900,850,870,840,860,810,820,830,400,300,200,100,50,60,40

There should be a total of 20 elements in your tree when you are done.

2) Deletes

  1. Delete the root from the tree you obtained when done with problem 1.  Use the immediate predecessor.
  2. Delete the root from the tree you obtained when done with problem 1.  Use the immediate successor.
  3. Delete the root from the tree you obtained when done with problem 2A.  Use the immediate predecessor.
  4. Delete the root from the tree you obtained when done with problem 2A  Use the immediate successor.
  5. Delete the root from the tree you obtained when done with problem 2C Use the immediate predecessor.
  6. Delete the root from the tree you obtained when done with problem 2C  Use the immediate successor.