Consider returning the node's actual stored value instead of returning the node itself. Users of the tree likely only care about the data stored in the tree, not the structural components.
Perhaps consider returning the value by default, yet allowing a flag to get the structural node?
Consider returning the node's actual stored value instead of returning the node itself. Users of the tree likely only care about the data stored in the tree, not the structural components.
Perhaps consider returning the value by default, yet allowing a flag to get the structural node?