Hi

I need help with this,

1) an algorithm or way to count the levels of an unbalance binary tree (e.g. root has one level

2) to balance this unbalance tree

can I have some hints please! or examples

greatly appreciated

For part one, this link might help. Part two is a little more involved, so try part one first then have a try at part two and repost if you have any trouble.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.