As you are aware that in a very max heap, the most ingredient is the foundation node. and it'll take out the ingredient which has utmost priority initial. Hence, you take away the foundation node through the queue.
you https://fanniezzev221277.blog5.net/71189450/priority-queue-javascript-an-overview