## Buy/Download all MCQ Ebook
>>>**Click Here**<<<

## Data Structure Questions and Answers-Heap

## Click on any option to know the CORRECT ANSWERS

Question 1 |

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

Leaf node | |

First node of left sub tree | |

root node | |

First node of right sub tree |

**English literature Questions answers**

Question 1 Explanation:

This is one of the property of max-heap that root node must have key greater than its children.

Question 2 |

Heap exhibits the property of a binary tree?

True | |

False |

**English literature Questions answers**

Question 2 Explanation:

Yes, Because the leaf nodes are present at height h or h-1, which is a property of complete binary tree.

Question 3 |

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

O(log n) | |

O(h) | |

O(log n) & O(h) | |

None of the mentioned |

**Microbiology Questions answers**

Question 3 Explanation:

The total possible operation in re locating the new location to a new element will be equal to height of the heap.

Question 4 |

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

O(logn) | |

O(n) | |

O(nlogn) | |

O(n ^{2}) |

**Public administration Questions answers**

Question 4 Explanation:

The total possible operation in deleting the existing node and re locating new position to all its connected nodes will be equal to height of the heap.

Question 5 |

Heap can be used as .....

Priority queue | |

Stack | |

A decreasing order array | |

None of the mentioned |

**Aptitude test Questions answers**

Question 5 Explanation:

The property of heap that the value of root must be either greater or less than both of its children makes it work like a priority queue.

There are 5 questions to complete.