码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
[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-10-27 12:39:09    阅读次数:192
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 = "ADOBECODEBANC" T = "ABC" Minimum window is "BAN...
分类:Windows程序   时间:2014-10-26 18:31:18    阅读次数:300
LeetCode-Sort List
Sort a linked list inO(nlogn) time using constant space complexity.链表排序。要达到nlogn的时间复杂度,能想到归并排序与快速排序。这里采用归并排序: 1 /** 2 * Definition for singly-linked ....
分类:其他好文   时间:2014-10-26 10:17:34    阅读次数:186
leetcode - 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-10-25 17:24:28    阅读次数:145
【LeetCode】Single Number
题目      Given an array of integers, every element appears twice except for one. Find that single one.      Note:      Your algorithm should have a linear runtime complexity. Could you implement i...
分类:其他好文   时间:2014-10-25 00:51:38    阅读次数:214
LeetCode: Search for a Range 解题报告
Search for a RangeGiven a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity ...
分类:其他好文   时间:2014-10-24 14:16:18    阅读次数:238
Leetcode:Singel Number
问题描述: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without ...
分类:其他好文   时间:2014-10-24 13:08:49    阅读次数:221
quickSort in-place version whose space complexity is O(log(N))
1 public void quickSortSwapping(int data[]){ 2 //call this method 3 quickSortSwapping(data,0,data.length); 4 } 5 6 7 public void quickSortSwapping(...
分类:其他好文   时间:2014-10-24 12:48:46    阅读次数:232
leetcode第33题--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-10-23 22:35:17    阅读次数:215
【leetcode】Find Minimum in Rotated Sorted Array II JAVA实现
一、题目描述Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose ...
分类:编程语言   时间:2014-10-22 20:02:55    阅读次数:236
1097条   上一页 1 ... 90 91 92 93 94 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!