What is the reason for blocking first index(0th index) of the array ?
Build heap from array
It is just blocked for convenience because
a formula was generalized that for a node at index i, its left child will be at index 2i and right child will be at 2i+1. But this formula will not work correctly when i is 0. This is why i=0 is blocked.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.