But using the counter only allows us to know we are in a loop AFTER we are already in it for long time. In other words, it does not help sovling the problem: we can not finish the BFS! So it is better to have a way to prevent us from getting into the loop at the first place, right?
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---