Starting from:

$30

BIM213-AVL-tree-main Solved

Homework 3 

In this homework you will implement a AVL tree (Adelson-Velsky-Landis). The goal is to maintain the AVL property, and to count the number of times a key is inserted into the tree. 


The base code for your project is given on with this file. You are required to fill in the functions given in AVL.java. Specifically, you are to fill in the following methods with obvious meanings defined in AVL class:  


(1)  Insert 

(2)  Delete 

(3)  Find 

(4)  Min 

(5)  Max 

(6)  Depth 

(7)  Print 

 
To implement these methods, you may need private auxiliary methods. Do implement them if you think such helper methods are necessary. Make sure your application does not crash on several circumstances (e.g. if the key to be added already exists) 
 

More products