Data Structure Questions and Answers-Splay Tree

 

 Help authour, Buy PDF Ebook   >>>Click Here<<<

Data Structure Questions and Answers-Splay Tree

Question 1
What are splay trees?
A
self adjusting binary search trees
B
self adjusting binary trees
C
a tree with strings
D
a tree with probability distributions
EVS Questions answers
Question 1 Explanation: 
Splay trees are height balanced, self adjusting BST's.

Question 2
Which of the following property of splay tree is correct?
A
it holds probability usage of the respective sub trees
B
any sequence of j operations starting from an empty tree with h nodes atmost, takes O(jlogh) time complexity
C
sequence of operations with h nodes can take O(logh) time complexity
D
splay trees are unstable trees
English grammar Questions answers
Question 2 Explanation: 
This is a property of splay tree that ensures faster access. we push the most recently used nodes to top which leads to faster access to recently used values.

Question 3
Why to prefer splay trees?
A
easier to program
B
space efficiency
C
easier to program and faster access to recently accessed items
D
quick searching
KBC Questions answers
Question 3 Explanation: 
Whenever you insert an element or remove or read an element that will be pushed or stored at the top which facilitates easier access or recently used stuff.

Question 4
Is it true that splay trees have O(logn) amortized complexity?
A
true
B
false
Data interpretation (DI) Questions answers
Question 4 Explanation: 
We go with amortized time complexity when we feel that not all operations are worst and some can be efficiently done. in splay trees not all splay operations will lead to O(logn) worst case complexity.

Question 5
What is a splay operation?
A
moving parent node to down of child
B
moving a node to root
C
moving root to leaf
D
removing leaf node
Journalism Questions answers
Question 5 Explanation: 
Splay trees mainly work using splay operations. wheneve we insert, delete and search for a node we splay the respective nodes to root. we have zig-zag and zig-zig operations.

There are 5 questions to complete.

 

 Download all FREE PDF Ebook >>>CLICK HERE<<<