上一页 1 2 3 4 5 6 7 ··· 19 下一页
摘要: 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 阅读(119) 评论(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 阅读(141) 评论(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 阅读(145) 评论(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 阅读(121) 评论(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 阅读(195) 评论(0) 推荐(0)
摘要: Total Accepted: 92484Total Submissions: 288998Difficulty: MediumContributors: AdminSort a linked list using insertion sort.分析按照传统的插入方法,对list进行排序 56ms123456789101112131415161718192021222324252627282930... 阅读全文
posted @ 2017-02-14 22:36 copperface 阅读(225) 评论(0) 推荐(0)
摘要: Total Accepted: 83528Total Submissions: 314574Difficulty: HardContributors: AdminGiven a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume ... 阅读全文
posted @ 2017-02-14 21:46 copperface 阅读(243) 评论(0) 推荐(0)
摘要: Total Accepted: 105470Total Submissions: 367141Difficulty: MediumContributors: AdminGiven a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return... 阅读全文
posted @ 2017-02-14 19:19 copperface 阅读(170) 评论(0) 推荐(0)
摘要: Given a singly linked list L: L0 → L1 → … → Ln-1 → Lnreorder it to: L0 → Ln → L1 → Ln-1 → L2 → Ln-2 → …Have you met this question in a real interview? YesExampleGiven 1->2->3->4->null, reorder it to 1... 阅读全文
posted @ 2017-02-14 16:52 copperface 阅读(236) 评论(0) 推荐(0)
摘要: Merge two sorted (ascending) linked lists and return it as a new sorted list. The new sorted list should be made by splicing together the nodes of the two lists and sorted in ascending order.Have you ... 阅读全文
posted @ 2017-02-14 15:59 copperface 阅读(190) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 19 下一页