Search:

Type: Posts; User: Cornix

Search: Search took 0.10 seconds.

  1. Replies
    8
    Views
    996

    Re: Need Help making this non-recursive

    Well in that case you are of course right. I was just saying, if the comment suggests it should never happen it would be better to actually never let it happen.
  2. Replies
    8
    Views
    996

    Re: Need Help making this non-recursive

    Yeah, I forgot that, but you got it right with your edited version.
    Of course the vertex needs to be set to visited before (or after) being added to the queue.

    Which queue to take is not an easy...
  3. Replies
    8
    Views
    996

    Re: Need Help making this non-recursive

    This looks like a graph traversal algorithm, similar to pathfinding algorithms.
    If this is the case then you could simply use the same mechanism used in pathfinding: put nodes of your graph into a...
Results 1 to 3 of 3