Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
2)一个小坑在判断root和root的next是否为空上。
3)可以看为追及问题。最关键的坑在判断快走(每次走2步的节点),走1步会不会已经走到头。。。
/**
* Definition for singly-linked list.原文地址:http://blog.csdn.net/shahongzhou/article/details/40385775