2-3 tree implementation

Hi all.Does anyone have an implementation of a 2-3 (balanced) tree data structure that supports insert and delete operations?Any such help would be much appreciated.
[186 byte] By [Nighteyesa] at [2007-10-2 1:05:19]
# 1
Please don't crosspost.They (2-3 trees) are also known as B-trees. Try Googling for some example code. If you have a specific question, you can post it here.
prometheuzza at 2007-7-15 18:26:07 > top of Java-index,Other Topics,Algorithms...
# 2
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.
Nighteyesa at 2007-7-15 18:26:07 > top of Java-index,Other Topics,Algorithms...
# 3

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.

orlandoma at 2007-7-15 18:26:07 > top of Java-index,Other Topics,Algorithms...
# 4
It's not exactly what I was looking for, but thanks for the effort!
Nighteyesa at 2007-7-15 18:26:07 > top of Java-index,Other Topics,Algorithms...
# 5
What you are looking for is Red-Black Tree.You may find a java implementation of RBT at the following URL, http://www.public.iastate.edu/~dingjing/download.html
dingjinga at 2007-7-15 18:26:07 > top of Java-index,Other Topics,Algorithms...
# 6

> 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.

rkippena at 2007-7-15 18:26:07 > top of Java-index,Other Topics,Algorithms...
# 7

> 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?

Nighteyesa at 2007-7-15 18:26:07 > top of Java-index,Other Topics,Algorithms...
# 8
me puedes mandar el tree 2-3
superman22a at 2007-7-15 18:26:07 > top of Java-index,Other Topics,Algorithms...