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

Programming information system, Describe an algorithm to play the Game of N...

Describe an algorithm to play the Game of Nim using all of the three tools (pseudocode, flowchart, hierarchy chart)

Stack, implement multiple stacks ina single dimensional array. write algori...

implement multiple stacks ina single dimensional array. write algorithams for various stack operation for them.

Algorithsm, What are the properties of an algorithsm?

What are the properties of an algorithsm?

ALGORITHMS, WRITE AN ALGORITHM TO READ TWO NUMBERS AND PRINT THE LOWER VALU...

WRITE AN ALGORITHM TO READ TWO NUMBERS AND PRINT THE LOWER VALUE

Efficient way of storing two symmetric matrices, Explain an efficient way o...

Explain an efficient way of storing two symmetric matrices of the same order in memory. A n-square matrix array is said to be symmetric if a[j][k]=a[k][j] for all j and k. For

Logic circuits, the voltage wave forms are applied at the inputs of an EX-O...

the voltage wave forms are applied at the inputs of an EX-OR gate. determine the output wave form

If else, design algorithm and flow chart that computes the absolute differe...

design algorithm and flow chart that computes the absolute difference of two values x and y

Representation of data structure in memory, Representation of data structur...

Representation of data structure in memory is known as: Abstract data type

Creation of doubly linked list, Program: Creation of Doubly Linked List ...

Program: Creation of Doubly Linked List OUTPUT Input the values of the element -1111 to come out : 1 Input the values of the element -1111 to come out : 2 Inpu

Binary search, Explain binary search with an example

Explain binary search with an example

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