Answer to the question no (1)
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 to the question no (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.