摘要: 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? 解题报告: 1. 找到LinkedList 的中点 2. 翻转链表( 阅读全文
posted @ 2016-08-13 10:17 YuriFLAG 阅读(120) 评论(0) 推荐(0)
摘要: Reverse a singly linked list. recursive version iterative version 阅读全文
posted @ 2016-08-13 09:23 YuriFLAG 阅读(89) 评论(0) 推荐(0)