摘要:
Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space?/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: bool hasCycle... 阅读全文
posted @ 2013-11-13 10:00
懒猫欣
阅读(125)
评论(0)
推荐(0)
浙公网安备 33010602011771号