Results 1 to 4 of 4

Thread: A Binary Tree question

  1. #1
    I have to make a function of binarytree class.

    function will return the level with maximum number of nodes.
    I m using the Linked representation of binary tree.
    Crazy about filesharing

  2. Internet, Programming and Graphics   -   #2
    erRor67's Avatar Lord Of Everything
    Join Date
    Mar 2003
    Location
    Everywhere
    Posts
    798
    If the tree is complete, the last level should have the max nodes.. If the pre condition is that it may or maynot be complete, then ur going to have to do it in recursion.. Cant give u the specific code though cause i havent done binarytrees in a long ass time.
    blah blah blah... whatever...



  3. Internet, Programming and Graphics   -   #3
    Member BT Rep: +1
    Join Date
    Jan 2006
    Posts
    13
    and your question is exactly what?

  4. Internet, Programming and Graphics   -   #4
    If you had generated the full functional binary tree , it would just be a matter for tree traversal.You have to design a method for tree traversal that would assist in finding the number of nodes on each level.
    I can get you the code but give the detailed specification on how are you implementing the program?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •