Sort
文章平均质量分 75
dyllanzhou
这个作者很懒,什么都没留下…
展开
-
[Leetcode]H-Index
Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According to the definition of h-index on Wikipedia: "A原创 2015-11-04 14:50:14 · 263 阅读 · 0 评论 -
[Leetcode]Insertion Sort List
Sort a linked list using insertion sort. /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */原创 2015-10-23 13:47:20 · 245 阅读 · 0 评论 -
[Leetcode]Sort List
Sort a linked list in O(n log n) time using constant space complexity. /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : v原创 2015-11-09 23:26:44 · 179 阅读 · 0 评论 -
[Leetcode]Merge Intervals
Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18]. /** * Definition for an interval. * struct Inter原创 2016-01-29 15:31:12 · 317 阅读 · 0 评论 -
[Leetcode]Insert Interval
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Examp原创 2016-01-29 16:14:55 · 336 阅读 · 0 评论