I just wonder if for DFS, we don't really need an array to act as a Stack (LIFO), but we can just use recursion.
Is it true that the main concern is stack overflow? (if too deep level). If we use the array as a stack, then the overflow problem is gone. Now, however, if our program is to spider the web, and we set the levelMax to 10, then the stack overflow problem is really not there, as the deepest call stack level is 10. Is it true that for BFS, you always have to use an array as a Queue (FIFO)? Using an array seems a bit like a "global variable". Is it possible at all to do BFS without using a queue and just use recursion? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---