Menu

Heaps Questions

MCQ
1.
In a Heap tree
forum Discussion
MCQ
2.
In a min heap
forum Discussion
MCQ
3.
In a Heap tree
forum Discussion
MCQ
4.
Heap is an example of ................
forum Discussion
MCQ
5.
The running time for creating a heap of size n is .............
forum Discussion
MCQ
6.
In a min-heap:
forum Discussion
MCQ
7.
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.

data-structure-questions-answers-heap-q6
forum Discussion
MCQ
8.
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.

data-structure-questions-answers-heap-q7
forum Discussion
MCQ
9.
Why is heap implemented using array representations than tree(linked list) representations though both tree representations and heaps have same complexities?

for binary heap

-insert: O(log n)

-delete min: O(log n)

for a tree

-insert: O(log n)

-delete: O(log n)

Then why go with array representation when both are having same values ?
forum Discussion
MCQ
10.
In a max-heap, element with the greatest key is always in the which node?
forum Discussion
Page 1 of 4Next chevron_right