Hi,
I think you are describing a B+ tree (a modification of the B-tree), where all the data is saved in the leaves.
You can find an implementation of this kind of tree here:
http://www.seanster.com/BplusTree/BplusTree.html
There is a link at the bottom saying
The Java source code is available here.
> Sorry about the crossposting.
> B-trees are not quite what i'm after.
> The data structure i need is one where the leaves
> contain the elements and internal nodes do not.
> However, the tree performs in O (lg n) time for
> insert and remove operations because it remains
> balanced.
Is this some sort of joke? So what you are saying is the leaves contain all the data? So how do I traverse a path from the root to a leaf is there is no data except in the leaf? I think you are looking for B-Trees.
> Is this some sort of joke? So what you are saying is
> the leaves contain all the data? So how do I
> traverse a path from the root to a leaf is there is
> no data except in the leaf? I think you are looking
> for B-Trees.
Each 'internal' node contains information about the lowest and highest data value of it's subtrees. Hence, one can traverse the tree, from root to leaf by using this information.
Any other ideas?