码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
[LeetCode]26. Search in Rotated Array II旋转数组查找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...
分类:编程语言   时间:2015-10-15 17:58:36    阅读次数:142
LeetCode Find Peak Element
原题链接在这里:https://leetcode.com/problems/find-peak-element/两种方法,第一种从头到尾遍历若是找到第一个变小的值,前面一个就是peak index, 若是一直变大,就是最后一个值为peak index. Time Complexity: O(n), ...
分类:其他好文   时间:2015-10-14 14:16:54    阅读次数:242
Find Minimum in Rotated Sorted Array II
Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose a sort...
分类:其他好文   时间:2015-10-13 01:35:06    阅读次数:206
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...
分类:其他好文   时间:2015-10-10 12:00:43    阅读次数:125
Master Theorem
Master theorem provides a solution in asymptotic terms to solve time complexity problem of most divide and conquer algorithms.Recurrence relations of ...
分类:其他好文   时间:2015-10-07 06:18:52    阅读次数:208
Single Number
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Your algorithm should have a linear runtime complexity. C.....
分类:其他好文   时间:2015-10-06 15:17:44    阅读次数:125
Binary Search
Time complexity O(log(n)). When the question requires O(log(n)) time complexity, we always need to think whether it can be solved by binary search.For...
分类:其他好文   时间:2015-10-06 07:00:43    阅读次数:176
76. Minimum Window Substring (Map)
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="ADOBECODEBA...
分类:Windows程序   时间:2015-10-04 19:41:05    阅读次数:196
Median of Two Sorted Arrays
题目: There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity s....
分类:其他好文   时间:2015-10-03 20:41:54    阅读次数:277
148. Sort List (List)
Sort a linked list inO(nlogn) time using constant space complexity.class Solution {public: ListNode *sortList(ListNode *head) { if(!head || ...
分类:其他好文   时间:2015-10-03 10:40:19    阅读次数:138
1097条   上一页 1 ... 39 40 41 42 43 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!