Very versatile

very very versatile.

Lets follow this NeuralNine course again

https://www.youtube.com/watch?v=DlWxqU3LLpY

Some of the bullshit programmers deal with every day.

A tree is just a method of representing choices. It is like a tree in real life, however, upside down. The branches branch downwards starting from the root node.

We always start with one root node. This root node can be any data type.

so, this root node has a value of 5.

the tree is referred to as binary because each node will have 2 branches to their left and to their right.

So, the left branch of this root node could be whatever number is smaller than 5.

in this case, it is 3. whatever is in the right branch of 5 is whatever is bigger or equal to 5.

also the tree is recursive so the 3 node will continue on the same logic.

we keep on recusing until the nodes will have none as their children.

Trees can be expanded upon like: KD Trees