摘要: Problem statement Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? Solution This is a cl 阅读全文
posted @ 2017-06-15 11:47 蓝色地中海 阅读(121) 评论(0) 推荐(0)
摘要: Problem statement Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space? Solution This i 阅读全文
posted @ 2017-06-15 11:29 蓝色地中海 阅读(129) 评论(0) 推荐(0)