码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
LeetCode "Is Subsequence"
There are 3 possible approaches: DP, divide&conquer and greedy. And apparently, DP has O(n^2) complexity, DivideConquer can only be worse. Greedy can ...
分类:其他好文   时间:2016-10-24 07:42:05    阅读次数:234
Examples of complexity pattern
O(1):constant - the operation doesn't depend on the size of its input, e.g. adding a node to the tail of a linked list where we always maintain a poin ...
分类:其他好文   时间:2016-10-17 23:03:46    阅读次数:159
leetcode 76 Minimum Window Substring ----- java
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 = "ADOBECOD ...
分类:编程语言   时间:2016-10-16 16:25:22    阅读次数:188
各种排序笔记---基于比较排序部分
1. 归并排序 归并排序是基于一种被称为“分治”(divide and conquer)的策略。 Sort List Sort a linked list in O(n log n) time using constant space complexity. method 1: merge sort ...
分类:编程语言   时间:2016-10-07 07:45:56    阅读次数:199
[LeetCode] 23. Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. ...
分类:其他好文   时间:2016-10-02 00:24:43    阅读次数:123
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-10-01 17:27:20    阅读次数:251
76. 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 = "ADOBECOD ...
分类:Windows程序   时间:2016-09-27 06:54:43    阅读次数:256
No.004: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 ...
分类:其他好文   时间:2016-09-26 14:47:29    阅读次数:128
34. 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-09-22 06:31:31    阅读次数:145
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-09-19 06:42:44    阅读次数:120
1097条   上一页 1 ... 24 25 26 27 28 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!