码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
LeetCode 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 should be O(log (m+n)) 代码如下: class Solutio...
分类:其他好文   时间:2015-06-02 09:26:44    阅读次数:103
Single Number II -- leetcode
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 without usi...
分类:其他好文   时间:2015-05-31 12:31:13    阅读次数:118
LeetCode 23: Merge K Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 本题在上一题(LeetCode 21: Merge Two Sorted Lists)基础上再加深了一步,链表个数从两个改为K个。 此题有如下几种解法: 1、最简单的方法莫过于每次...
分类:其他好文   时间:2015-05-31 09:14:50    阅读次数:150
Runtime Complexity of .NET Generic Collection
Runtime Complexity of .NET Generic CollectionI had to implement some data structures for my computational geometry class. Deciding whether to implemen...
分类:Web程序   时间:2015-05-31 06:47:30    阅读次数:228
Single Number -- leetcode
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 using ext...
分类:其他好文   时间:2015-05-29 18:16:19    阅读次数:142
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 it without...
分类:其他好文   时间:2015-05-28 23:16:30    阅读次数:173
No.148 Sort List
No.148 Sort ListSort a linked list inO(nlogn) time using constant space complexity.分析: 常量空间且O(nlogn)时间复杂度,单链表适合用归并排序,双向链表适合用快速排序 有一个问题是:若算上栈空间,空间复杂度.....
分类:其他好文   时间:2015-05-25 18:00:34    阅读次数:160
LeetCode:Sort List
Title:Sort a linked list inO(nlogn) time using constant space complexity.思路:考虑快速排序和归并排序,但是我的快速排序超时了ListNode* sortList(ListNode* head) { if (!he...
分类:其他好文   时间:2015-05-25 16:21:19    阅读次数:153
Source Monitor Tutorial
Source Monitor is a code analyzing tool that is capable of finding the complexity for Java, C++、C、C#、Delphi、Visual Basic and HTML source codes. It's a...
分类:其他好文   时间:2015-05-22 00:07:19    阅读次数:2132
Leetcode#154Find Minimum in Rotated Sorted Array II
FindMinimuminRotatedSortedArrayIITotalAccepted:25678TotalSubmissions:80978MySubmissionsQuestionSolutionFollowupfor"FindMinimuminRotatedSortedArray":Whatifduplicatesareallowed?Wouldthisaffecttherun-timecomplexity?Howandwhy?Supposeasortedarrayisrotatedatsomep..
分类:其他好文   时间:2015-05-21 06:44:54    阅读次数:162
1097条   上一页 1 ... 54 55 56 57 58 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!