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
Problem: (a) (i) What is a structure? (ii) How does a structure differ from an array? (b) Declare a structure, called account, that will contain the following data me

P o i n t er s to Members: In C a pointer is created  to locate  the address of another variable  for faster access. Consider the following example. int x, *p; p =

Operation on String - C ++ Program: Write a program to define operations on string in c++. class String {    char *char_ptr;   // pointer to string contents    int le


Just need the answers to the following 3 questions. "NO NEED to write a program compile or run it, do not need it. Just need the answers for the following questions. Example quest

find the minimum total number of shelves


Vogels approximation transportation problem in c language source code

Two numbers to be subtracted using bitwise operations

#questio#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 concatenation. For a string