Ternary and Pairing Heap MCQs

Ternary and Pairing Heap MCQs

 Q1. What is the process of building a ternary heap called?. 

A. Heapify. 

B. Hashing. 

C. Linking. 

D. Merging. 

Answer= Heapify


Q2. Which type of data structure is a ternary heap?. 

A. Array. 

B. Hash. 

C. Priority Queue 

D. Priority Stack. 

Answer= Priority Queue


Q3. Is the priority queue abstract data type.. 

A. TRUE. 

B. FALSE. 

C.  Nothing Can be said. 

D.  None of the mentioned. 

Answer= TRUE


Q4. What is a ternary heap?. 

A. An array with three elements. 

B. Linked list with three elements. 

C. Tree with three children. 

D. Heap with all nodes having three children. 

Answer= Heap with all nodes having three children


Q5. Who invented d-ary heap?. 

A. Carl Rick. 

B. Alan Turing. 

C. Donald Johnson. 

D. Euclid. 

Answer= Donald Johnson


Q6. What is the time complexity for inserting a new item in a ternary heap of n elements?. 

A. O (log n/ log 3). 

B. O (n!). 

C. O (n). 

D. O (1). 

Answer= O (log n/ log 3)


Q7. Is decrease priority operation performed more quickly in a ternary heap with respect to the binary heap.. 

A. TRUE. 

B. FALSE. 

C.  Nothing can be said. 

D.  None of the mentioned. 

Answer= TRUE


Q8. What is the time complexity for decreasing priority of key in a minimum ternary heap of n elements?. 

A. O (log n/ log 3). 

B. O (n!). 

C. O (n). 

D. O (1). 

Answer= O (log n/ log 3)


Q9. 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= O (log n/ log 3)


Q10. What is the time complexity for deleting root key in a ternary heap of n elements?. 

A. O (log n/ log 3). 

B. O (3log n/ log 3). 

C. O (n). 

D. O (1). 

Answer= O (3log n/ log 3)


Q11. What is the time complexity for increasing priority of key in a minimum ternary heap of n elements?. 

A. O (log n/ log 3). 

B. O (3log n/ log 3). 

C. O (n). 

D. O (1). 

Answer= O (3log n/ log 3)


Q12. 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= O (3log n/ log 3)


Q13. Do ternary heap have better memory cache behavior than binary heap.. 

A. TRUE. 

B. FALSE. 

C.  Nothing can be said. 

D.  None of the mentioned. 

Answer= TRUE


Q14. 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= O (n)


Q15. What is the reason for the efficiency of a pairing heap?. 

A. simplicity. 

B. time-efficient. 

C. space-efficient. 

D. advanced. 

Answer= simplicity


Q16. How is a pairing heap represented?. 

A. binary tree. 

B. fibonacci tree. 

C. heap ordered tree. 

D. treap. 

Answer= heap ordered tree


Q17. The actual pairing heap implementation uses the right child and left child representation.. 

A. TRUE. 

B. FALSE. 

C.  Nothing can be said. 

D.  None of the mentioned. 

Answer= FALSE


Q18. Which node contains a pointer to its parent?. 

A. root node. 

B. right most child. 

C. left most child. 

D. left sibling. 

Answer= left most child


Q19. What is the basic operation performed in a pairing heap?. 

A. merge. 

B. deletion. 

C. insertion. 

D. swapping. 

Answer= merge


Q20. Which of the following methods is the best choice for complex applications?. 

A. binary heap. 

B. d-heap. 

C. treap. 

D. pairing heap. 

Answer= pairing heap


Q21. Pairing heaps time complexity was inspired by that of?. 

A. splay tree. 

B. treap. 

C. red-black tree. 

D. avl tree. 

Answer= splay tree


Q22. The roots of the elements of the subtrees are smaller than the root of the heap.. 

A. TRUE. 

B. FALSE. 

C.  Nothing Can be said. 

D.  None of the mentioned. 

Answer= FALSE


Q23. The amortized time efficiency for performing deletion of a minimum element is?. 

A. O(N). 

B. O(log N). 

C. O(N2). 

D. O(M log N). 

Answer= O(log N)


Q24. Out of the following given options, which is the fastest algorithm?. 

A. fibonacci heap. 

B. pairing heap. 

C. d-ary heap. 

D. binary heap. 

Answer= fibonacci heap


Q25. 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= O(N)


Q26. Pointer manipulation is generally more time-consuming than multiplication and division.. 

A. TRUE. 

B. FALSE. 

C.  Nothing can be said. 

D.  None of the mentioned. 

Answer= TRUE


Q27. How many properties does a leftist heap support?. 

A. 1. 

B. 2. 

C. 3. 

D. 4. 

Answer= 3


Q28. In a leftist heap, the null path length of a null node is defined as?. 

A. 0. 

B. 1. 

C. null. 

D. -1. 

Answer= -1

Previous Post Next Post