Forum on discussion binary heap

Ans

Ans

by Md. Atikur Rahman -
Number of replies: 0

Answer for question- 01

A binary heap could be a heap system that takes the shape of a binary tree. Binary heaps are a standard way of implementing priority queues.


Answer for question- 02

For instant access to the foremost important value within the case of a Max Heap or the tiniest value within the case of a Min Heap. By “instant access” I mean constant time or O(1) for you computer scientists. This just implies that we all know where the value is visiting be which is within the muse of the tree or at the beginning of the array, hoping on which system you're using. Useful for priority rows and schedules, where the first item is prioritized. An exercise for this could be prioritizing patients at a hospital to figure on with the foremost effective priority.