对于输入的一个start page:http://en.wikipedia.org/wiki/Philosophy
这样的就是一个环,Algorithm-Algorithm,没必要一定指向startpage
http://en.wikipedia.org/wiki/Philosophy
http://en.wikipedia.org/wiki/Mathematics
http://en.wikipedia.org/wiki/Algorithm
http://en.wikipedia.org/wiki/Boolean_algebra
http://en.wikipedia.org/wiki/Google
http://en.wikipedia.org/wiki/Gesture_recognition
http://en.wikipedia.org/wiki/Algorithm
请问有没有什么高效的方法能够找到n个环(n:指定的数目)?
通过一个哈希表来检查重复的链接应该是更为有效的做法,直接判断一个链接是否已经被爬虫抓去过就行了