leetcode 算法
文章平均质量分 66
tyfengyu
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Merge k Sorted Lists
Q: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.思路:有人提到用baizh原创 2014-05-07 19:12:10 · 426 阅读 · 0 评论 -
Merge Sorted Array
Q:Given two sorted integer arrays A and B, merge B into A as one sorted array.方法:merge。原创 2014-05-07 16:39:57 · 445 阅读 · 0 评论 -
Merge Two Sorted Lists
Merge 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.原创 2014-04-26 00:10:43 · 433 阅读 · 0 评论 -
Sort List
Sort a linked list in O(n log n) time using constant space complexity./** * Definition for singly-linked list. * class ListNode { * int val; * ListNode next; * ListNode(int原创 2014-04-26 10:46:59 · 531 阅读 · 0 评论 -
Insertion Sort List
Sort a linked list using insertion sort. 思路:插入排序,每次都得从前往后扫,注意如何将待归位的点移至指定位置/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * L原创 2014-04-26 11:56:39 · 502 阅读 · 0 评论
分享