CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: nuzzle

Search: Search took 0.09 seconds.

  1. Re: methods of visiting the nodes on a level of a tree

    No it doesn't, but you don't have to visit any nodes below desiredlevel and that can be a substantial saving considering that the bulk of the nodes tend to be at the deepest levels.



    That's a...
  2. Re: methods of visiting the nodes on a level of a tree

    It should look like this,


    if($curlevel == $desiredlevel)
    {
    $this->Visit($node);
    if($nodesnr!==null)
    $nodesnr++;
    ...
  3. Re: methods of visiting the nodes on a level of a tree

    One way is to stop going deeper when you've reached the desired level. You just put in a return at the end of the if-statement where you check that the current level equals the desired level.
    ...
Results 1 to 3 of 3





Click Here to Expand Forum to Full Width

Featured