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

Can we convert the column data into row data, We download data which arrive...

We download data which arrives to me in a column. I need to use it in a complex sheet that requires data in a row. How can we convert the column data into row data?   Ans) H

Determine about the voice systems, Determine about the Voice Systems Sp...

Determine about the Voice Systems Speech recognizers are used in some graphics workstations as input devices to accept voice commands. The voice-system input can be used to ini

Explain time sharing operating system, Explain Time sharing operating syste...

Explain Time sharing operating system. Time sharing: It is also called as multi tasking, is a logical execution of multiprogramming. Multiple jobs are executed through the C

Demonstrate arc consistency, Demonstrate Arc consistency: To demonstra...

Demonstrate Arc consistency: To demonstrate the worth of performing an arc-consistency check before starting a serarch for a solution, we'll use an example from Barbara Smith'

What is inheritance, What is Inheritance? Inheritance is the method of ...

What is Inheritance? Inheritance is the method of deriving a feature of super class into sub class. Every sub class inherits the attributes, operations and association of its s

How to reduce total amount of disk space in ftp, Q. How to reduce total amo...

Q. How to reduce total amount of disk space in FTP? FTP service compress files to reduce total amount of disk space the files require. Before transferring a file user should te

Arrays of any size, Modify your program so that the line "int numStones = u...

Modify your program so that the line "int numStones = ui.readStones();" in the Game constructor is considered. Depending on the value of numStones read from the user, you should cr

Control signals from control bus, Control Signals from Control Bus: A numb...

Control Signals from Control Bus: A number of the control signals are provided to control unit by the control bus. These signals are issued from outside the CPU.  Some of these si

The average height or weight, A script kept information on potential subjec...

A script kept information on potential subjects for an experiment in a vector of structures known as "subjects".  The following show an example of what the contents may be: >> subj

Explain the principles of design, In structure chart whole application is d...

In structure chart whole application is divided into modules (set of program instructions) and modules are designed according to some principles of design. These are: Modularit

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