🌈 搜索
📅  最后修改于: 2022-03-11 14:57:47.892000             🧑  作者: Mango
let k = index you are looking at parent = (k - 1) // 2 # floor division leftChild = 2 * k + 1 rightChild = 2 * k + 2