, ,

[SOLVED] CS251 AVL Tree

$25

File Name: CS251_AVL_Tree.zip
File Size: 131.88 KB

Categories: , , Tags: , ,
5/5 - (1 vote)

CS251 AVL Tree

Requirement

Implement a C++ AVL Tree class AVLTree in files AVLTree.h and AVLTree.cpp

1. The constructor AVLTree () builds the AVLTree.

2. The destructor ~AVLTree() deallocates all dynamically allocated memory.

3. The void insert(int k) method inserts the key k into the AVLTree, and does not do anything if the key is already stored.

4. The void remove(int k) method removes key k from the AVLTree and does not do anything if AVLTree does not contain key k.

5. The items stored are positive integers which serve both as keys and as elements.

6. The void printInorder() method prints the tree to the standard output using an inorder traversal; it prints a (key, height) pair for each node and ends with a newline.

7. The void printPostorder() method prints the tree to the standard output using postorder traversal; it prints a (key, height) pair for each node and ends with a newline.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS251 AVL Tree[SOLVED] CS251 AVL Tree
$25