0

In maxHeapify, why is it necessary to check that the left and right indices are ≤ heap->size after calculating the index of the left and right children?

For this question a suggested response was to check the index sizes against heap->size to determine if the left child or right child does not exist.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Nov 11 '22 at 09:32

0 Answers0