摘要: Total Accepted: 89180Total Submissions: 281459Difficulty: MediumContributors: AdminGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equ... 阅读全文
posted @ 2017-02-15 21:28 copperface 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 97678Total Submissions: 339601Difficulty: MediumContributors: AdminGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the orig... 阅读全文
posted @ 2017-02-15 20:53 copperface 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 163106Total Submissions: 417745Difficulty: EasyContributors: AdminGiven a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, r... 阅读全文
posted @ 2017-02-15 19:45 copperface 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 96273Total Submissions: 399212Difficulty: MediumContributors: AdminGiven a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL... 阅读全文
posted @ 2017-02-15 19:12 copperface 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 65867Total Submissions: 304513Difficulty: MediumContributors: AdminGiven a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30,... 阅读全文
posted @ 2017-02-15 18:40 copperface 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 102820Total Submissions: 331280Difficulty: MediumContributors: AdminGiven a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify t... 阅读全文
posted @ 2017-02-15 17:32 copperface 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 158161Total Submissions: 443008Difficulty: EasyContributors: AdminGiven a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?Subscribe ... 阅读全文
posted @ 2017-02-15 17:25 copperface 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 191329Total Submissions: 435675Difficulty: EasyContributors: AdminReverse a singly linked list.Hint:A linked list can be reversed either iteratively or recursively. Could you implement... 阅读全文
posted @ 2017-02-15 17:21 copperface 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Sort a linked list in O(n log n) time using constant space complexity.Total Accepted: 94368Total Submissions: 342453Difficulty: MediumContributors: Admin分析首先可以使用和147相同的思想,把数字复制到vector 中,然后排序,再赋值回去1234... 阅读全文
posted @ 2017-02-15 16:56 copperface 阅读(191) 评论(0) 推荐(0) 编辑