Define a procedure called make-avl-tree, C/C++ Programming

This question deals with AVL trees. The representation to be used is similar to the bank account object discussed in class.

(a) Define a procedure called make-avl-tree which makes an AVL tree with no nodes. The procedure returns an AVL tree object.

(b) Write a procedure called (insert n t). This procedure has 2 arguments: n is the value being inserted, t is the AVL tree.

(c) Write a procedure called (lookup n t). This procedure has 2 arguments: n is the value being looked up, t is the AVL tree.

(d) Write a procedure called (delete n t). This procedure has 2 arguments: n is the node to be deleted, t is the AVL tree.

(e) Write a procedure called (print t). This procedure prints the AVL tree passed in t in inorder traversal form.

 

Posted Date: 3/25/2013 1:08:57 AM | Location : United States







Related Discussions:- Define a procedure called make-avl-tree, Assignment Help, Ask Question on Define a procedure called make-avl-tree, Get Answer, Expert's Help, Define a procedure called make-avl-tree Discussions

Write discussion on Define a procedure called make-avl-tree
Your posts are moderated
Related Questions

Define Functions with arguments and return values? The earlier category functions receive values from the calling function through arguments but do not send back any value rath

Define some features of register storage class in c program? The feature of variable defined to be of register type all as follows: Storage - CPU registers Default initia

smugglers transfer the messages from one to another by using the mobile

##question.A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string co   program in jav


A: If you employ auto_ptr objects you would not need to be concerned along with heap objects not being deleted even if the exception is thrown.

Define Keywords in C++ K e y w o r d s: K e y w o rd s a r e t h e w o rd s a l r e a d y u s e d b y C + + i n i t s c

Threaded binary tree: Consider the linked illustration of a binary tree 'T.  Approximately half of the entries is the pointer fields 'LEFT' and 'RIGHT' will have null elements. Th

there is a pebble merchant. he sells the pebbles,that are used for shining the floor.his main duty is to take the length of the room side but he sometines mistakes doing that and m