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

Class and object, write a class player that contain attributes for the play...

write a class player that contain attributes for the player,s name,average and team

Create a programming system, Your task is to create a programming system fo...

Your task is to create a programming system for a ferry. The ferry transports passengers and vehicles (cars, busses, lorries and bicycles). The ferry has space for 200 passengers a

How can we simulate the concept of multiple inheritance, Problem: (a) U...

Problem: (a) Using a class hierarchy of your own choosing, with at least TWO subclass levels, show (i) the use of abstract and concrete forms of Java class and method in you

Recursion, write a cprogram to calculate fraction through recursion

write a cprogram to calculate fraction through recursion

Pointer to function, how many values we can return from pointer to function...

how many values we can return from pointer to function?

LOOP, DIFFERENCE BETWEEN WHILE AND DO WHILE LOOP?

DIFFERENCE BETWEEN WHILE AND DO WHILE LOOP?

Structure and classes in c++, want to understand the working of structure a...

want to understand the working of structure and classes

#luminous jewel polishing necklace, Ask question # Byteland county is very ...

Ask question # Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particu

Strings, A string S is said to be "Super ASCII", if it contains the charact...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Big M method, I Want a answer for solving the big M method in the topic of ...

I Want a answer for solving the big M method in the topic of simplex method...

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