码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
LeetCode Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 题意:将k个已经排好序的链表合并成一个 思路:用到优先队列比较简单。 /** * Definition for singly-linked list. * struct ListNod...
分类:其他好文   时间:2015-02-10 16:47:11    阅读次数:124
leetcode[23]Merge k Sorted Lists
Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity./** * Definition for singly-linked list. * struct List...
分类:其他好文   时间:2015-02-10 15:08:02    阅读次数:148
leetcode[34]Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord...
分类:其他好文   时间:2015-02-10 15:04:55    阅读次数:150
leetcode[4]Median of Two Sorted Arrays
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ...
分类:其他好文   时间:2015-02-10 14:48:19    阅读次数:126
HappyLeetcode47:Median of Two Sorted Arrays
题目:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should ...
分类:移动开发   时间:2015-02-10 13:02:20    阅读次数:120
[leet code 4] Median of Two Sorted Arrays
1 题目There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should...
分类:其他好文   时间:2015-02-09 22:49:25    阅读次数:219
LeetCode Median of Two Sorted Arrays
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).思路分析:这题容易想到O(m+n)的解法,就是先Merge两个数组,然后返...
分类:其他好文   时间:2015-02-09 16:06:53    阅读次数:106
leetcode[76]Minimum Window Substring
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECODEBA...
分类:Windows程序   时间:2015-02-09 15:38:06    阅读次数:176
leetcode[81]Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to...
分类:其他好文   时间:2015-02-09 15:37:57    阅读次数:174
leetcode[148]Sort List
Sort a linked list inO(nlogn) time using constant space complexity./** * Definition for singly-linked list. * struct ListNode { * int val; * L...
分类:其他好文   时间:2015-02-09 02:01:37    阅读次数:212
1097条   上一页 1 ... 69 70 71 72 73 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!