Build a tree

Implement a complete treeā€”one that is completely full except possibly on the right end of the bottom row. Each element should be inserted from top to down and left to right along each level of the tree. For instance, inserting elements A,B,C,D,E,F,G,H,I,J would result in the following tree:
A
B C
D E F G
H I J . . . . .

Could anyone help me to build a c++ code for it
That's called a self balancing tree. Look up the algorithm and get back to us if you have difficulties coding it.
Topic archived. No new replies allowed.