Splaying algorithm, Data Structure & Algorithms

Assignment Help:

Insertion & deletion of target key requires splaying of the tree. In case of insertion, the tree is splayed to find the target. If, target key is found out, then we have a duplicate and the original value is maintained. However, if it is not found, then the target is inserted as the root.

In case of deletion, the target is searched through splaying the tree. Then, it is deleted from the root position and the remaining trees reassembled, if found out.

Hence, splaying is used both for insertion and deletion. In the former case, to determine the proper position for the target element and avoiding duplicity and in the latter case to bring the desired node to root position.


Related Discussions:- Splaying algorithm

Examination, Write an algorithm for binary search. What are its limitations...

Write an algorithm for binary search. What are its limitations? .

Define the term ''complexity of an algorithm, Define the term 'complexity o...

Define the term 'complexity of an algorithm; Complexity of an algorithm is the calculate of analysis of algorithm. Analyzing an algorithm means predicting the resources that th

Define container in terms of object-oriented terms, Define container in te...

Define container in terms of  object-oriented terms A Container is a broad category whose instances are all more specific things; there is never anything which is just a Contai

Insertion in list, In the array implementation of lists, elements are store...

In the array implementation of lists, elements are stored into continuous locations. In order to add an element into the list at the end, we can insert it without any problem. But,

Internal sorting, In internal sorting, all of the data to be sorted is obta...

In internal sorting, all of the data to be sorted is obtainable in the high speed main memory of the computer. We will learn the methods of internal sorting which are following:

Explain divide and conquer algorithms, Explain divide and conquer algorithm...

Explain divide and conquer algorithms  Divide  and  conquer  is  probably  the  best  known  general  algorithm  design  method.  It   work according to the following general p

What is efficiency of algorithm, What is Efficiency of algorithm? Effic...

What is Efficiency of algorithm? Efficiency of an algorithm can be precisely explained and investigated with mathematical rigor.  There are two types of algorithm efficiency

Memory allocation strategies, Q. Explain the various memory allocation stra...

Q. Explain the various memory allocation strategies.                                                            Ans. M e m ory Allocation Strategies are given as follow

Explain the representations of graph, Explain the representations of graph....

Explain the representations of graph. The different ways of representing a graph is: Adjacency list representation : This representation of graph having of an array Adj of

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