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 class Solution...
分类:
其他好文 时间:
2015-10-25 06:11:39
阅读次数:
153
Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2015-10-24 18:59:37
阅读次数:
182
CSS:/* Make it a marquee */.marquee { width: 450px;margin: 0 auto;overflow: hidden;white-space: nowrap;box-sizing: border-box;animation: marquee 50s ....
分类:
Web程序 时间:
2015-10-24 15:50:06
阅读次数:
273
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?思路:维护两个指针,一快一慢,判断两个指针能否相遇。 1 class Solutio...
分类:
其他好文 时间:
2015-10-24 12:54:25
阅读次数:
154