摘要: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For 阅读全文
posted @ 2016-05-09 21:41 西小贝 阅读(184) 评论(0) 推荐(0)
摘要: Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. note: 开始时,两指针都指向h 阅读全文
posted @ 2016-05-09 19:01 西小贝 阅读(158) 评论(0) 推荐(0)