retagged by
289 views
0 votes
0 votes

What feature of heaps allows them to be efficiently implemented using a partially filled array?

  1. Heaps are binary search trees.
  2. Heaps contain only integer data.
  3. Heaps are full binary trees.
  4. Heaps are complete binary trees.
retagged by

1 Answer

Best answer
3 votes
3 votes

A heap is a complete binary tree; that is, all levels of the tree, except possibly the last level (deepest) are fully filled , if the last level of the tree is not complete, the nodes of that level are filled from left to right. 

This property of a heap allows them to be efficiently implemented using a partially filled array .

Hence the option is D .

Answer:

Related questions

0 votes
0 votes
1 answer
1
1 votes
1 votes
2 answers
2
Bikram asked Feb 9, 2017
319 views
A ternary tree is a tree in which every internal node has exactly three children.The number of leaves in a ternary tree with $’z’$ internal nodes is _______.$2$$\left...
0 votes
0 votes
1 answer
4