Explain how a node can be inserted into an avl tree, Computer Engineering

Assignment Help:

Explain how a node can be inserted into an AVL tree.

We can insert a node into an AVL tree through the insertion algorithm for binary search trees in which we compare the key of the latest node with that in the root and then insert the latest node into the left subtree or right subtree depending on whether it is less than or greater than that in the root. Insertion might or might not result in change in the height of the tree. Whereas inserting we must take care that the balance factor of any node not changes to values other than 0, 1 and -1. A tree becomes unbalanced if and only if

(i) The latest inserted node is a left descendant of a node that lastly had a balance of 1.

(ii) The latest inserted node is a right descendent of a node that lastly had a balance of -1.

 


Related Discussions:- Explain how a node can be inserted into an avl tree

#title., REPRESENTATION OF POYNOMIAL OF 2 OR MORE VARIABLES USING ARRAY

REPRESENTATION OF POYNOMIAL OF 2 OR MORE VARIABLES USING ARRAY

Determine the performance of a parallel algorithm, Q. Determine the perform...

Q. Determine the performance of a parallel algorithm? One more method of determining the performance of a parallel algorithm can be performed after calculating a parameter know

Explain short note about molap?, Classic form of OLAP is called as MOLAP an...

Classic form of OLAP is called as MOLAP and it is often known as OLAP. Simple database structures like time period, product, location, etc are used. Functioning of each and every d

Explain the real time system, What is real time system? A real time sys...

What is real time system? A real time system has well explained, fixed time constraints. Processing must be done within the explained constraints, or the system will fail. It i

Characteristics of a computer memory systems, Question: a) Describe wha...

Question: a) Describe what is meant by a "bus". There are two types of bus, dedicated and multiplexed. Give a brief description of both types of buses. b) Briefly explain f

What are the special unit related fields and methods, What are the special ...

What are the special unit related fields and methods?   The most significant method (in fact pseudo method) related to units is get_enclosing_unit().  The mostly used field in

What are the features common in most of the websites, What are the features...

What are the features common in most of the websites Following general features must be found on most web sites in one form or another (this list is by no means exhaustive):

How e-commerce works for the shop owner, E-commerce is working in tandem wi...

E-commerce is working in tandem with the real shop and if all the products are online running the e-commerce shop is becoming simpler. Owner log in on the special admin side of the

Explain bottom up parsing, Explain Bottom up parsing. Bottom up pars...

Explain Bottom up parsing. Bottom up parsing: This parse attempts to increase syntax tree for an input string by a sequence of reduction. If the input string can be decreas

Associative array processing, Consider that a list of record or a table is ...

Consider that a list of record or a table is stored in the memory and you wish to find some information in that particular list. E.g. the list comprises three fields as displayed b

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