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
Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules. a. A call made between 8:00 AM and 6:

Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc, which increments its argument by 1, and dec, which decrements

Program of Binary tree: Btree::Btree(int O) : itemsInContainer(0) {     finishInit(O); }   Btree::~Btree(void) {     if( root != 0 )         delete roo

Introduction. In this assignment you are required to simulate a maze traversal using so called recursive backtracking (the algorithm is given below). The grid of #s and 0s in the f

Produce a pseudo code to be used for development compute and display some data on the bounces a ball will make when dropped from a given height. To simplify the problem, you ass

Bitwise Operations 1. Write a function that has an int parameter n, makes an integer mask having the bit 1 at the nth place from the rightmost bit, and returns the mask. For ex

When you are designing a generic class to have or otherwise manage objects of other types, when the format and behavior of those other types are unimportant to their containment or

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


Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4