LevelOrder() Tranverse

This is a discussion on LevelOrder() Tranverse within the C++ Programming forums, part of the General Programming Boards category; I am looking for any information on the LevelOrder Tranverse. Can anyone help me out on that?...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    84

    LevelOrder() Tranverse

    I am looking for any information on the LevelOrder Tranverse. Can anyone help me out on that?

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    101
    1. Push the head on a queue.
    2. Pop the queue and push the children of the popped node on the queue.
    3. Process the popped node (ie. show it on the screen).
    4. Go back to 2 until there are no more nodes in the queue.
    - lmov

  3. #3
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    That's also called breadth first traversal right?
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21