摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?分析:... 阅读全文
posted @ 2015-05-20 21:52 amazingzoe 阅读(137) 评论(0) 推荐(0)
摘要: Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?分析:用map记录是否出现过。用时:60ms 1 /** 2 * Definiti... 阅读全文
posted @ 2015-05-20 21:38 amazingzoe 阅读(135) 评论(0) 推荐(0)
摘要: Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor... 阅读全文
posted @ 2015-05-20 00:46 amazingzoe 阅读(209) 评论(0) 推荐(0)