**DOWNLOAD FREE PDF** **<<CLICK HERE>>**

## Data Structure Questions and Answers-Splay Tree

Congratulations - you have completed *Data Structure Questions and Answers-Splay Tree*.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%

Your answers are highlighted below.

Question 6 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

**Which of the following options is an application of splay trees?**

cache Implementation | |

networks | |

send values | |

receive values |

Question 6 Explanation:

Splay trees can be used for faster access to recently accessed items and hence used for cache implementations.

Question 7 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

**When we have red-black trees and AVL trees that can perform most of operations in logarithmic times, then what is the need for splay trees?**

no there is no special usage | |

In real time it is estimated that 80% access is only to 20% data, hence most used ones must be easily available | |

redblack and avl are not upto mark | |

they are just another type of self balancing binary search trees |

Question 7 Explanation:

May be the stats showing 80-20% may be not accurate, but in real time that is the widely spread scenario seen. If you are into this type of situation, you must choose implementing splay trees.

Question 8 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

**After the insertion operation, is the resultant tree a splay tee?**

true | |

false |

Question 8 Explanation:

There is a zig-zag and right operation(zig) which gives the right hand side tree. refer splay operations for insertion in splay tree.

Question 9 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

**What output does the below pseudo code produces?**

Tree....node function(Tree....node x) { Tree....node y = x.left; x.left = y.right; y.right = x; return y; }

right rotation of subtree | |

left rotation of subtree | |

zig-zag operation | |

zig-zig operation |

Question 9 Explanation:

When a right rotation is done the parent of the rotating node becomes it's right node and it's child becomes it's left child.

Question 10 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

**What is the disadvantage of using splay trees?**

height of a splay tree can be linear when accessing elements in non decreasing order. | |

splay operations are difficult | |

no significant disadvantage | |

splay tree performs unnecessary splay when a node is only being read |

Question 10 Explanation:

This will be the case after accessing all n elements in non-decreasing order. Since the height of a tree corresponds to the worst-case access time, this means that the actual cost of an operation can be high. However the amortized access cost of this worst case is logarithmic O(log n).

Once you are finished, click the button below. Any items you have not completed will be marked incorrect.

There are 10 questions to complete.