Traverse binary tree to find complete level

Discussion in 'PHP' started by Om ji Kesharwani, Sep 16, 2010.

  1. #1
    Please provide me function or any tutoraial to count the completed level of a binary tree.

    Ex. if a tree having 2 member in first level and 3 members in second level then the completed level is 1 because the level 2 should b 4 members to complete.

    Please open this url: http://en.wikipedia.org/wiki/Binary_tree

    The tree in this url is having 1 level completed because the 2nd level should have 4 nodes.
     
    Om ji Kesharwani, Sep 16, 2010 IP