# Number of nodes of height $h$ in a heap or almost complete binary tree

I came up with the following statement:

If there are $X$ nodes of height $h$ in an almost complete binary tree, there can be at most 1 node of height $h$ that is not full.

That is to say, $X-1$ must full and the last node of height $h$ may or may not be full.

Intuitively it seems right, but I can't seem to prove it. Could someone help me prove it. If the statement is false, please let me know why.

• What is an "almost complete binary tree"? – Yuval Filmus Jun 1 '17 at 13:04

full full ... full (one possibly non-full) leaf leaf ...leaf