My Report (&Account)

Ternary Heap Test


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)

1. Heap exhibits the property of a binary tree?

2. The worst case complexity of deleting any arbitrary node value element from heap is __________

3. What is the complexity of adding an element to the heap.

4. If we implement heap as min-heap, deleting root node (value 1)from the heap. What would be the value of root node after second iteration if leaf node (value 100) is chosen to replace the root at start.
The value of root node after second iteration is 2 if leaf node is chosen at start

5. If we implement heap as maximum heap , adding a new node of value 15 to the left most node of right subtree. What value will be at leaf nodes of the right subtree of the heap.
15 & 1 will be at leaf nodes of right subtree of heap if we implement heap

6. In a max-heap, element with the greatest key is always in the which node?

7. Heap can be used as ________________

8. An array consists of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order of


 

Start practicing “1000 MCQs on Data Structure”, and once you are ready, you can take tests on all topics by attempting our “Data Structure Test Series”.

advertisement
advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.