A
abhrajit
I'm looking for a C/C++/Java library to create a balanced binary tree
data structure given a set of leaf nodes as input. A leaf node should
never become an interior node.
So if I wish to create a tree that will have a,b,c & d as leaf nodes -
this tree will contain nodes other than a,b,c & d as interior nodes:
e.g.
x
/ \
y z
/ \ / \
a b c d
The tree is balanced (to the extent possible) and all the input nodes
are leaves. (x,y,z are internal nodes that were not specified as
input).
Appreciate any help,
Abhrajit
data structure given a set of leaf nodes as input. A leaf node should
never become an interior node.
So if I wish to create a tree that will have a,b,c & d as leaf nodes -
this tree will contain nodes other than a,b,c & d as interior nodes:
e.g.
x
/ \
y z
/ \ / \
a b c d
The tree is balanced (to the extent possible) and all the input nodes
are leaves. (x,y,z are internal nodes that were not specified as
input).
Appreciate any help,
Abhrajit