码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
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...
分类:其他好文   时间:2014-11-29 11:38:36    阅读次数:128
[LeetCode] 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="ADOBECOD...
分类:Windows程序   时间:2014-11-28 06:18:27    阅读次数:309
Merge k Sorted Lists -- leetcode
Merge k Sorted ListsMerge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.两种实现方法,第一种采用优先队列,第二种采用分治/** * Definition for singly-linked list. * struct ListNo...
分类:其他好文   时间:2014-11-27 20:36:39    阅读次数:227
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 order of O(log n). If the target is not found ...
分类:其他好文   时间:2014-11-27 14:34:49    阅读次数:200
Leetcode-Sort List
Sort a linked list in O(n log n) time using constant space complexity.Analsys:We use Merge Sort.NOTE: We should practice other sort algorithm, linke Q...
分类:其他好文   时间:2014-11-27 01:35:39    阅读次数:213
[leetcode]
问题描述: Follow up for "Find Minimum in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose a sorted array is rotated at som...
分类:其他好文   时间:2014-11-26 22:40:43    阅读次数:240
对链表排序,时间开销O(nlogn), 空间开销O(1)
Sort a linked list in O(n log n) time using constant space complexity....
分类:编程语言   时间:2014-11-26 16:37:32    阅读次数:172
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 = "ADOBECODEBANC" T = "ABC" Minimum window is "BANC". ...
分类:Windows程序   时间:2014-11-26 16:33:21    阅读次数:229
[LeetCode] Search in Rotated 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...
分类:其他好文   时间:2014-11-26 13:45:50    阅读次数:179
Leetcode Single Number
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:其他好文   时间:2014-11-25 14:21:59    阅读次数:183
1097条   上一页 1 ... 85 86 87 88 89 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!