链表
文章平均质量分 82
Snowwolf_Yang
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【LeetCode】Swap Nodes in Pairs & Reverse Nodes in k-Group
Swap Nodes in Pairs Total Accepted: 11380 Total Submissions: 35880My SubmissionsGiven a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, y原创 2014-04-22 19:33:33 · 538 阅读 · 0 评论 -
【LeetCode】Partition List
Partition List Total Accepted: 14597 Total Submissions: 54894My SubmissionsGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than原创 2014-08-16 23:42:07 · 543 阅读 · 0 评论 -
【LeetCode】Remove Duplicates from Sorted List & Remove Duplicates from Sorted List II
Remove Duplicates from Sorted List Total Accepted: 22211 Total Submissions: 63769My SubmissionsGiven a sorted linked list, delete all duplicates such that each element appear only once.原创 2014-08-16 00:01:36 · 647 阅读 · 0 评论 -
【LeetCode】 Rotate List
Rotate List Total Accepted: 13773 Total Submissions: 62790My SubmissionsGiven a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->原创 2014-08-15 22:36:27 · 503 阅读 · 0 评论 -
【LeetCode】Reverse Linked List II
Reverse Linked List II Total Accepted: 15366 Total Submissions: 59341My SubmissionsReverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->原创 2014-08-17 11:40:35 · 589 阅读 · 0 评论 -
【LeetCode】Merge Two Sorted Lists & Merge k Sorted Lists
Merge Two Sorted Lists Total Accepted: 20769 Total Submissions: 62658My SubmissionsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing toge原创 2014-08-15 23:03:58 · 519 阅读 · 0 评论 -
【LeetCode】Remove Nth Node From End of List
Remove Nth Node From End of List Total Accepted: 17965 Total Submissions: 60372My SubmissionsGiven a linked list, remove the nth node from the end of list and return its head.For examp原创 2014-08-14 22:22:17 · 482 阅读 · 0 评论 -
【LeetCode】Flatten Binary Tree to Linked List
Flatten Binary Tree to Linked List Total Accepted: 18516 Total Submissions: 66328My SubmissionsGiven a binary tree, flatten it to a linked list in-place.For example,Given 1原创 2014-08-11 23:24:12 · 538 阅读 · 0 评论 -
【LeetCode】Copy List with Random Pointer
Copy List with Random Pointer Total Accepted: 16149 Total Submissions: 70123My SubmissionsA linked list is given such that each node contains an additional random pointer which could poi原创 2014-08-11 22:53:43 · 510 阅读 · 0 评论 -
【LeetCode】Sort List
先说自己的参考吧。http://www.cnblogs.com/x1957/p/3492219.html这位大牛写的很精简的,非常好。题目链接http://oj.leetcode.com/problems/sort-list/题目说明:就是要对一个链表进行排序,要求复杂度是nlogn。常见排序算法有: 图片引用:http://blog.chinau原创 2014-03-25 15:14:56 · 811 阅读 · 0 评论 -
【LeetCode】list专题
这一部分需要重点复习。Partition List Total Accepted: 8713 Total Submissions: 33321My SubmissionsGiven a linked list and a value x, partition it such that all nodes less than x come befo原创 2014-04-28 23:06:32 · 547 阅读 · 0 评论 -
【LeetCode】Convert Sorted List to Binary Search Tree
Convert Sorted List to Binary Search Tree Total Accepted: 16035 Total Submissions: 59053My SubmissionsGiven a singly linked list where elements are sorted in ascending order, convert it原创 2014-08-17 11:36:45 · 668 阅读 · 0 评论
分享