parent heap 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