ELI5: Explain Like I'm 5

Complete binary tree

So, imagine you have a tree. But not just any tree. This is a special tree called a "complete binary tree."

What makes it special? Well, first of all, every level of the tree is completely filled with nodes (or boxes with stuff inside). And, if there are any spots left over on the bottom level, they all have to be on the far-right side.

But what's a binary tree, you ask? Good question! That just means each node in the tree can have at most two children (or boxes underneath it).

So, imagine you start with just one box at the top. That's the root node. Then, it can have up to two children boxes underneath it. Let's say it has two, one on the left and one on the right. Those two boxes can each have up to two children of their own, and so on.

This keeps going until every level of the tree is filled up with boxes. And, if there are any leftover spots on the bottom level, they all have to be on the far-right side.

That's what makes it a complete binary tree: every level is full, and the bottom level is filled in from left to right.