Exponential tree
|
An exponential tree is almost identical to a [binary search tree], with the exception that the dimension of the tree is not the same at all levels. In a normal binary search tree, each node has a dimension (d) of 1, and has 2^d children. In an exponential tree, the dimension = the depth of the node, with the root node having a d=1. So the 2nd level can hold 2 nodes, the 3rd can hold 8 nodes, the 4th 64 nodes, and so on.
In java this can be represented like this, where the nodes member is initialized at creation.
public class Node {
Node[] nodes; Object data;
}