Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Determining if an n-ary tree is balanced or not.

0 views
Skip to first unread message

cgirl

unread,
Jun 25, 2009, 10:58:20 PM6/25/09
to
I am trying to determine if an n-ary tree is balanced or not, I have
been stuck trying several approaches and am getting nowhere. My new
thought is that i will have to step through each node of the tree, and
compare the lengths of the roots of the children, making sure there is
not a difference greater than one in the values for all of the
children. Am i thinking in the right direction, or is there a simpler
solution?

thanks,
kim

0 new messages