码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
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 ...
分类:其他好文   时间:2016-04-08 13:14:51    阅读次数:122
空间复杂度是什么?What does ‘Space Complexity’ mean? ------geeksforgeeks 翻译
这一章比较短! 空间复杂度(space complexity)和辅助空间(auxiliary space)经常混用,下面是正确的辅助空间和空间复杂度的定义 辅助空间:算法需要用到的额外或者暂时的存储空间。 空间复杂度:是指算法所需要的所有存储空间,这是跟输入数据的大小决定的。空间复杂度包括辅助空间和 ...
分类:其他好文   时间:2016-04-07 07:07:33    阅读次数:118
lintcode-medium-Sort List
Sort a linked list in O(n log n) time using constant space complexity. Example Given 1-3->2->null, sort it to 1->2->3->null. /** * Definition for List ...
分类:其他好文   时间:2016-04-06 08:12:15    阅读次数:114
4. Median of Two Sorted Arrays (二分法;递归的结束条件)
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sh ...
分类:其他好文   时间:2016-04-06 07:05:34    阅读次数:239
lintcode-medium-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 functio ...
分类:其他好文   时间:2016-04-05 19:16:24    阅读次数:124
Sort a linked list in O(n log n) time using constant space complexity.
...
分类:其他好文   时间:2016-04-02 22:50:24    阅读次数:191
Codeforces Round #346 (Div. 2) (659A,659B,659C,659D(几何叉乘),659E(并查集))
Round House 题目链接: http://codeforces.com/problemset/problem/659/A 解题思路: The answer for the problem is calculated with a formula ((a?-?1?+?b)  n + n)  n + 1. Such solution has complexity...
分类:其他好文   时间:2016-04-01 10:18:00    阅读次数:242
lintcode-medium-Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example Given lists: [ 2->4->null, null, -1->null ] ...
分类:其他好文   时间:2016-03-31 09:31:51    阅读次数:169
LeetCode sort-list
问题描述:Sort a linked list in O(n log n) time using constant space complexity. O(n lgn)时间复杂度,O(1)空间复杂度。 分析:O(n lgn)时间复杂度的排序算法有几个(快排,归并,希尔,堆),但是O(1)空间复杂度就 ...
分类:其他好文   时间:2016-03-29 14:18:49    阅读次数:134
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 or ...
分类:其他好文   时间:2016-03-28 15:00:51    阅读次数:144
1097条   上一页 1 ... 32 33 34 35 36 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!