LeetCode
cjn_
这个作者很懒,什么都没留下…
展开
-
Delete Node in a Linked List
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value 3, t原创 2017-10-30 22:28:30 · 258 阅读 · 0 评论 -
Palindrome Linked List
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?转自: http://www.cnblogs.com/grandyang/p/4635425.html解法一: 这道题让我们判断一个链表是否为回文链表,那么根据回文串的转载 2017-10-30 22:37:20 · 248 阅读 · 0 评论 -
leetcode Problems notes
一、Linked List1、Remove Linked List ElementsRemove all elements from a linked list of integers that have value val.Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5/原创 2018-02-26 21:41:51 · 358 阅读 · 0 评论