
Linked List
slbyzdgz
这个作者很懒,什么都没留下…
展开
-
LeetCode---Merge Two Sorted Lists、Remove Duplicates from Sorted List 、II
21.Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->...原创 2019-07-15 09:38:05 · 155 阅读 · 0 评论 -
LeetCode---Add Two Numbers、Remove Nth Node From End of List、 Partition List
2.Add Two NumbersYou are given twonon-emptylinked lists representing two non-negative integers. The digits are stored inreverse orderand each of their nodes contain a single digit. Add the two ...原创 2019-07-15 15:18:21 · 117 阅读 · 0 评论 -
LeetCode---Linked List Cycle、Linked List Cycle II、Intersection of Two Linked Lists
141.Linked List CycleGiven a linked list, determine if it has a cycle in it.To represent a cycle in the given linked list, we use an integerposwhich represents the position (0-indexed)in the l...原创 2019-07-16 09:53:49 · 185 阅读 · 0 评论 -
LeetCode---Reverse Linked List、Reverse Linked List II、Remove Linked List Elements
206.Reverse Linked ListReverse a singly linked list.Example:Input: 1->2->3->4->5->NULLOutput: 5->4->3->2->1->NULLFollow up:A linked list can be reversed eit...原创 2019-07-16 11:25:57 · 142 阅读 · 0 评论 -
LeetCode---Delete Node in a Linked List
237.Delete Node in a Linked ListWrite a function to delete a node (except the tail) in a singly linked list, given only access to that node.Given linked list --head =[4,5,1,9], which looks like...原创 2019-07-17 10:27:18 · 137 阅读 · 0 评论