MCQOPTIONS
Saved Bookmarks
This section includes 11 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is the disadvantage of using splay trees? |
| A. | height of a splay tree can be linear when accessing elements in non decreasing order. |
| B. | splay operations are difficult |
| C. | no significant disadvantage |
| D. | splay tree performs unnecessary splay when a node is only being read |
| Answer» B. splay operations are difficult | |
| 2. |
What output does the below pseudo code produces? |
| A. | right rotation of subtree |
| B. | left rotation of subtree |
| C. | zig-zag operation |
| D. | zig-zig operationView Answer |
| Answer» B. left rotation of subtree | |
| 3. |
After the insertion operation, is the resultant tree a splay tee? |
| A. | true |
| B. | false |
| Answer» B. false | |
| 4. |
right rotation of subtree$ |
| A. | left rotation of subtree |
| B. | zig-zag operation |
| C. | zig-zig operation |
| Answer» B. zig-zag operation | |
| 5. |
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? |
| A. | no there is no special usage |
| B. | In real time it is estimated that 80% access is only to 20% data, hence most used ones must be easily available |
| C. | redblack and avl are not upto mark |
| D. | they are just another type of self balancing binary search trees |
| Answer» C. redblack and avl are not upto mark | |
| 6. |
Which of the following options is an application of splay trees? |
| A. | cache Implementation |
| B. | networks |
| C. | send values |
| D. | receive values |
| Answer» B. networks | |
| 7. |
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 |
| Answer» C. moving root to leaf | |
| 8. |
Is it true that splay trees have O(logn) amortized complexity ? |
| A. | true |
| B. | false |
| Answer» B. false | |
| 9. |
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 |
| Answer» D. quick searching | |
| 10. |
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 |
| Answer» C. sequence of operations with h nodes can take O(logh) time complexity | |
| 11. |
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 |
| Answer» B. self adjusting binary trees | |