A Heap is stored in an array: the root is at index 1, the children of node i are...
✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
A Heap is stored in an array: the root is at index 1, the children of node i are at indexes 2i and 2i+1. Conversely, the parent of node j is stored at index [j/2].