Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Trying to determing if n-ary tree is balanced.

Reply
Thread Tools

Trying to determing if n-ary tree is balanced.

 
 
cgirl
Guest
Posts: n/a
 
      06-26-2009
I am trying to determing if a 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
 
Reply With Quote
 
 
 
 
red floyd
Guest
Posts: n/a
 
      06-26-2009
cgirl wrote:
> I am trying to determing if a 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?


Did you have a C++ question? Try comp.algorithms
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determing database fieldtype IN GridView1_RowDataBound() event Edwin Knoppert ASP .Net 0 11-24-2005 10:10 AM
How to determing Grid object tshad ASP .Net 2 10-27-2004 10:33 PM
Determing and ASPX's Page size (content Length) SamIAm ASP .Net 0 02-10-2004 10:33 PM
B tree, B+ tree and B* tree Stub C Programming 3 11-12-2003 01:51 PM
Determing the ordinal position of items in ListBox SamIAm ASP .Net 1 09-29-2003 07:16 AM



Advertisments