Approach hintTry it first, then revealHide
Number nodes as in a heap (children 2i and 2i + 1) during a level-order traversal; a level's width is its last index minus its first plus one. Subtract the level's first index to avoid overflow.
Number nodes as in a heap (children 2i and 2i + 1) during a level-order traversal; a level's width is its last index minus its first plus one. Subtract the level's first index to avoid overflow.