insertion amp deletion of target key requires


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.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: insertion amp deletion of target key requires
Reference No:- TGS0413911

Expected delivery within 24 Hours