Let’s talk about the tree data structure (programmers don’t have their trees upside-down, nature does).
The first thing to talk about is, well… what is it, exactly?
I’m sure everybody is familiar with the following visual representation of a tree:
How does Wikipedia define it?
In computer science, a tree is a widely used abstract data type that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node, represented as a set of linked nodes.
Not very helpful.
The long and short of it is: A tree is a way to structure your…