Meant for very large tree-sets, yea? This tree is aimed at implementing an idea that the depth of a tree can be known from the root-node without a breadth-first or depth-first search.
Every time a node is updated on the tree, it increases the depth-count of its parent, which also increases the depth count of its parent in a recursive manner, so the depth of the entire tree is always known from the root-node.
Ofcourse, this is only a prototype, and i'll be happy to accept notes on improving the algorithm.
- For now, nodes are only added and not removed.