In part 2, when we list out all the links of a particular web page, we dont want a link to be show up more then twice in our list. I have a question on how we're supposed to do this. In the book when explaining the shortest path algorithm, the graph is acyclic and they are continually dequeueing. Yet the web is a cyclic(a link can a have a back to home link), so am i supposed to keep the start page, and all its link in a queue in order to compare them. This will significantly slow down the program and create a very large queue. Whats up? |