At which nodes of a heap can an entry with the largest key be stored? code example
Example: parent of heap node
let k = index you are looking at
parent = (k - 1) // 2 # floor division
leftChild = 2 * k + 1
rightChild = 2 * k + 2
let k = index you are looking at
parent = (k - 1) // 2 # floor division
leftChild = 2 * k + 1
rightChild = 2 * k + 2