/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: //采用快慢指针: //假设:起点到环入口点的距离是a,环入口点到快慢指针相遇点的距离是b,相遇点到环入口点的距离是c //相遇时,快指针走a+b+m(b+c) 慢指针走a+b+n(b+c) //满足2[a+b+...