码迷,mamicode.com
首页 >  
搜索关键字:palindromelinkedlist    ( 2个结果
LeetCode234_PalindromeLinkedList (推断是否为回文链表) Java题解
题目: 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? 题解: 推断一个链表是不是回文的,这里要求O(n)时间复杂 ...
分类:编程语言   时间:2017-05-22 17:48:12    阅读次数:107
LeetCode234_PalindromeLinkedList (判断是否为回文链表) Java题解
题目: 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? 题解: 判断一个链表是不是回文的,这里要求O(n)时间复杂度和O(1)的空间时间复杂度,总共想了三种办法,三种办法都用到了两个指针,符合...
分类:编程语言   时间:2015-07-29 12:13:09    阅读次数:136
2条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!