码迷,mamicode.com
首页 >  
搜索关键字:merge k sorted lists    ( 11722个结果
LeetCode ---- Merge Sorted Array
题目链接Problem discriptionGiven two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size t...
分类:其他好文   时间:2014-06-16 11:12:36    阅读次数:192
Leetcode:Convert Sorted List to Binary Search Tree
Description :Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.分析:这道题目简单版是把一个排序好的数组转成平衡的二叉树...
分类:其他好文   时间:2014-06-16 10:51:54    阅读次数:237
[Leetcode] Sort List
Question:Sort a linked list inO(nlogn) time using constant space complexity.Solution:Merge sort.找到链表的中间的那个ListNode. 1 /** 2 * Definition for singly-l....
分类:其他好文   时间:2014-06-12 17:59:34    阅读次数:285
[leetcode]Insert Interval @ Python
原题地址:https://oj.leetcode.com/problems/insert-interval/题意:Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if ne...
分类:编程语言   时间:2014-06-12 16:13:09    阅读次数:350
[leetcode]Merge Intervals @ Python
原题地址:https://oj.leetcode.com/problems/merge-intervals/题意:Given a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[2,6]...
分类:编程语言   时间:2014-06-12 14:55:49    阅读次数:235
第十五章 链表
/**数组与链表的区别:数组易随机访问,链表易插入和删除链表组成:储存数据元素的数据域,储存下一结点地址的指针域链表易于插入与删除lists 的用法?????????????????????*///建立一个图书链表#include#include using namespace std;struct...
分类:其他好文   时间:2014-06-12 06:44:48    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!