码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
sort list (7)
Sort a linked list in O(n log n) time using constant space complexity.解决这个问题让我很是纠结,能不能用快速排序呢?我试了很多次,结果总是超时,甚至在用系统自带的stl时也是这样。为什么呢?事后想想,快速排序没有充分利用链表的连贯...
分类:其他好文   时间:2014-11-08 13:20:59    阅读次数:245
搜索 + 剪枝 --- POJ 1101 : Sticks
SticksProblem's Link:http://poj.org/problem?id=1011Mean:http://poj.org/problem?id=1011&lang=zh-CN&change=trueanalyse:爆搜,但是其中蕴含着很多剪枝。Time complexity: O...
分类:其他好文   时间:2014-11-07 20:47:43    阅读次数:218
[LeetCode]Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target is in the...
分类:其他好文   时间:2014-11-07 19:10:51    阅读次数:161
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-06 17:05:57    阅读次数:134
Search Insert Position
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-06 16:36:09    阅读次数:144
快学Scala习题解答—第一章 基础
1简介近期对Scala比较感兴趣,买了本《快学Scala》,感觉不错。比《Programming Scala:Tackle Multi-Core Complexity on the Java Virtual Machine》好很多。 是本不错的入门书。而且每个章节都设置了难度级别,每章有习题,可以巩...
分类:其他好文   时间:2014-11-06 12:35:48    阅读次数:147
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 ord...
分类:其他好文   时间:2014-11-02 12:11:14    阅读次数:215
Choose Concurrency-Friendly Data Structures
What is a high-performance data structure? To answer that question, we're used to applying normal considerations like Big-Oh complexity, and memory ov...
分类:其他好文   时间:2014-10-31 20:32:41    阅读次数:153
LeetCode:Single Number(2)
问题描述: Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it ...
分类:其他好文   时间:2014-10-30 11:52:50    阅读次数:256
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(log (m+...
分类:其他好文   时间:2014-10-29 22:23:33    阅读次数:226
1097条   上一页 1 ... 89 90 91 92 93 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!