MCQOPTIONS
Saved Bookmarks
This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Do ternary heap have better memory cache behavior than binary heap. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 2. |
The procedure FindMin() to find the minimum element and the procedure DeleteMin() to delete the minimum element in min heap take _________ |
| A. | logarithmic and linear time constant respectively |
| B. | constant and linear time respectively |
| C. | constant and quadratic time respectively |
| D. | constant and logarithmic time respectively |
| Answer» E. | |
| 3. |
How many comparisons will occur while performing a delete-min operation? |
| A. | d |
| B. | d-1 |
| C. | d+1 |
| D. | 1 |
| Answer» C. d+1 | |
| 4. |
Does there exist a heap with seven distinct elements so that the Inorder traversal gives the element in sorted order. |
| A. | Yes |
| B. | No |
| Answer» C. | |
| 5. |
How many types of the merge are available in skew heaps? |
| A. | 1 |
| B. | 2 |
| C. | 3 |
| D. | 4 |
| Answer» C. 3 | |
| 6. |
Should leaves in ternary heap be distributed from left to right. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 7. |
Is the priority queue abstract data type. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 8. |
What is the node path length of a node with 0 or 1 child? |
| A. | 1 |
| B. | -1 |
| C. | 0 |
| Answer» D. | |
| 9. |
Pairing heaps time complexity was inspired by that of? |
| A. | splay tree |
| B. | treap |
| C. | red-black tree |
| D. | avl tree |
| Answer» B. treap | |
| 10. |
What is the time per operation of merging, insertion and deletion operations in a skew heap? |
| A. | O(N) |
| B. | O(log N) |
| C. | O(N log N) |
| D. | O(N2) |
| Answer» C. O(N log N) | |
| 11. |
___________ is a self-adjusting version of a leftist heap. |
| A. | Rightist heap |
| B. | Skew heap |
| C. | d-heap |
| D. | Binary heap |
| Answer» C. d-heap | |
| 12. |
Why would a recursive implementation fail in skew heaps? |
| A. | skew heaps are self adjusting |
| B. | efficiency gets reduced |
| C. | lack of stack space |
| D. | time complexity |
| Answer» D. time complexity | |
| 13. |
Which of the following is difficult to determine the right path length? |
| A. | Skew heaps |
| B. | Binomial tree |
| C. | Leftist heap |
| D. | d-heap |
| Answer» B. Binomial tree | |
| 14. |
What is the time complexity for decreasing priority of key in a maximum ternary heap of n elements? |
| A. | O (log n/ log 3) |
| B. | O (3log n/ log 3) |
| C. | O (n) |
| D. | O (1) |
| Answer» C. O (n) | |
| 15. |
What is the time taken to delete a minimum element in a leftist heap? |
| A. | O(N) |
| B. | O(N log N) |
| C. | O(log N) |
| D. | O(M log N) |
| Answer» D. O(M log N) | |
| 16. |
The relationship of skew heaps to leftist heaps is analogous to that of? |
| A. | Splay tree and AVL tree |
| B. | Red black tree and AVL tree |
| C. | Binary tree and Splay tree |
| D. | Binary tree and Red black tree |
| Answer» B. Red black tree and AVL tree | |
| 17. |
In a leftist heap, all the operations should be performed on? |
| A. | left path |
| B. | centre path |
| C. | right path |
| D. | root |
| Answer» D. root | |
| 18. |
How many nodes does a leftist tree with r nodes must have? |
| A. | 2r |
| B. | 2r-1 |
| C. | 2r |
| D. | 2r-1 |
| Answer» C. 2r | |
| 19. |
The worst case running time of all operations in a skew heap is given as? |
| A. | O(N) |
| B. | O(N log N) |
| C. | O(N2) |
| D. | O(M log N) |
| Answer» B. O(N log N) | |
| 20. |
Which type of data structure is a ternary heap? |
| A. | Array |
| B. | Hash |
| C. | Priority Queue |
| D. | Priority Stack |
| Answer» D. Priority Stack | |
| 21. |
What is the run time efficiency of an insertion algorithm? |
| A. | O(N) |
| B. | O(log N) |
| C. | O(N2) |
| D. | O(M log N) |
| Answer» B. O(log N) | |
| 22. |
Which of the following operations does not destroy the leftist heap property? |
| A. | insert |
| B. | merge |
| C. | delete |
| D. | swap |
| Answer» D. swap | |
| 23. |
Which of the following is the application of minimum ternary heap? |
| A. | Prim's Algorithm |
| B. | Euclid's Algorithm |
| C. | Eight Queen Puzzle |
| D. | Tree |
| Answer» B. Euclid's Algorithm | |
| 24. |
What is the amortized cost per operation of a skew heap? |
| A. | O(N) |
| B. | O(N log N) |
| C. | O(N2) |
| D. | O(log N) |
| Answer» E. | |
| 25. |
The roots of the elements of the subtrees are smaller than the root of the heap. |
| A. | True |
| B. | False |
| Answer» C. | |
| 26. |
What is the time complexity for increasing priority of key in a maximum ternary heap of n elements? |
| A. | O (log n/ log 3) |
| B. | O (n!) |
| C. | O (n) |
| D. | O (1) |
| Answer» B. O (n!) | |
| 27. |
The leaf node for a heap of height h will be at which position. |
| A. | h |
| B. | h-1 |
| C. | h or h-1 |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 28. |
Which of the following methods is the best choice for complex applications? |
| A. | binary heap |
| B. | d-heap |
| C. | treap |
| D. | pairing heap |
| Answer» E. | |
| 29. |
Which property should ternary heap hold for execution? |
| A. | Associative |
| B. | Commutative |
| C. | Tree |
| D. | Heap |
| Answer» E. | |
| 30. |
Descending priority queue can be implemented using ______ |
| A. | max heap |
| B. | min heap |
| C. | min-max heap |
| D. | trie |
| Answer» B. min heap | |
| 31. |
What is the run time efficiency of an insertion algorithm in d-heap? |
| A. | O(N) |
| B. | O(log N) |
| C. | O(logd N) |
| D. | O(Nd) |
| Answer» D. O(Nd) | |
| 32. |
What is the time complexity for creating a ternary heap using swapping? |
| A. | O (log n/ log 3) |
| B. | O (n!) |
| C. | O (n) |
| D. | O (1) |
| Answer» D. O (1) | |
| 33. |
An array consist of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order o? |
| A. | O(n*n*logn) |
| B. | O(n*logn) |
| C. | O(n*n) |
| D. | O(n *logn *logn) |
| Answer» C. O(n*n) | |
| 34. |
Heap can be used as ________________ |
| A. | Priority queue |
| B. | Stack |
| C. | A decreasing order array |
| D. | None of the mentioned |
| Answer» B. Stack | |
| 35. |
The worst case complexity of deleting any arbitrary node value element from heap is |
| A. | O(logn) |
| B. | O(n) |
| C. | O(nlogn) |
| D. | O(n<sup>2</sup>) |
| Answer» B. O(n) | |
| 36. |
What is the complexity of adding an element to the heap. |
| A. | O(log n) |
| B. | O(h) |
| C. | O(log n) & O(h) |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 37. |
Heap exhibits the property of a binary tree? |
| A. | True |
| B. | False |
| Answer» B. False | |
| 38. |
In a max-heap, element with the greatest key is always in the which node? |
| A. | Leaf node |
| B. | First node of left sub tree |
| C. | root node |
| D. | First node of right sub tree |
| Answer» D. First node of right sub tree | |