5
votes

I keep seeing it defined as

A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.

But..I have no clue as to what it means by "all nodes are as far left as possible." That's..literally my question. I can't expand on it any further because I have no idea what it means by "all nodes are as far left as possible." Like..as far left as possible compared to what? I don't get it

1

1 Answers

6
votes

The as far left as possible part applies to the last level. That is, at the last level, you should start filling nodes from the left.

For example, the following is a valid complete binary tree since at the last level, all the nodes are as far left as possible

enter image description here

The following is not

enter image description here