use child pays parent electrum, What Does Child Support Cover?
Because it does not need to point to child nodes and parent nodes (which requires the most fuel-consuming thing: storage space), it uses the simplest arithmetic method, which is to move from child node to parent node by dividing the index by 2, moving from parent node to left child node or right child node by multiplying index by 2 or index by 2 plus 1.