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

Assignment Help:

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.

 


Related Discussions:- Define a procedure called make-avl-tree

Explain private derivation, Private derivation If no specific derivatio...

Private derivation If no specific derivation is listed, then a private derivation is supposed. If a new class is derived privately from its parent class, then: The priva

Constructor , What is constructor or ctor? need help

What is constructor or ctor? need help

FIND AREA UNDER CURVE, Write a program to find the area under the curve y =...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Assignment, can you tell me what is c#

can you tell me what is c#

Artificial block, What if I cannot wrap the local in an artificial block? n...

What if I cannot wrap the local in an artificial block? need help on Artificial Block in c++.

We want network-social app, We are seeking a talented developer/team with g...

We are seeking a talented developer/team with great experience in programming apps for both Android and iOS. Our project needs great skills and experience in making good functional

Explain function overloading, F u nction overloading: Functions can b...

F u nction overloading: Functions can be defined with same name.  Depending upon the type of argument passed the function will perform.  This is known function overloading

Implement binary heap in c++?, A:BinaryHeap.h ------------ #ifndef BI...

A:BinaryHeap.h ------------ #ifndef BINARY_HEAP_H_ #define BINARY_HEAP_H_ #include "dsexceptions.h" #include "vector.h" // BinaryHeap class // CONSTRUCTION: wi

Fraction coding, Create a program that asks the user for two integers which...

Create a program that asks the user for two integers which represent the numerator and denominator parts of fraction. Print out a simplification of the fraction. Example: Enter th

Write a program that illustrate creation of a data file, Write a Program th...

Write a Program that illustrate creation of a data file? Here is a program to generate a Fibonacci series and write it into a Data file. # include main() { FILE *fpt;

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd