Ask Question

What is the difference between a minheap and a maxheap?

+1
Answers (1)
  1. 2 May, 02:11
    0
    In the data structure, min heap uses the ascending priority method in which the small element is to be pop first from the heap. It basically define as root node is either equal to or less than to the child node in the heap method.

    On the other hand, max heap use the descending priority method in which the large element pop first from the heap. In the max heap, the value in the root node is either equal to or greater to its child node.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is the difference between a minheap and a maxheap? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers