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 ...
分类:
其他好文 时间:
2019-01-19 13:14:15
阅读次数:
137
领域驱动设计之领域模型 2004年Eric Evans发表Domain-Driven Design – Tackling Complexity in the Heart of Software (领域驱动设计),简称Evans DDD。领域驱动设计分为两个阶段: 1. 以一种领域专家、设计人员、开发 ...
分类:
其他好文 时间:
2019-01-15 14:24:05
阅读次数:
169
return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n). ...
分类:
其他好文 时间:
2019-01-15 10:47:54
阅读次数:
214
Software Architecture Architecture serves as a blueprint for a system. It provides an abstraction to manage the system complexity and establish a comm ...
分类:
其他好文 时间:
2019-01-10 20:27:39
阅读次数:
122
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). Example: Input: S = "ADOB ...
https://www.cnblogs.com/gaochundong/p/complexity_of_algorithms.html https://www.zhihu.com/question/21387264 https://blog.csdn.net/zolalad/article/deta ...
分类:
其他好文 时间:
2018-12-10 18:01:18
阅读次数:
187
四个复杂度分析: 1:最好情况时间复杂度(best case time complexity) 2:最坏情况时间复杂度(worst case time complexity) 3:平均情况时间复杂度(average case time complexity) 4:均摊时间复杂度(amortized ...
分类:
其他好文 时间:
2018-11-17 19:26:35
阅读次数:
177
Time complexity: O(m + n) Space complexity: O(1) 值得提高的地方: 1. LinkedList 可以通过增加index为-1的node来使代码更精简,看起来更好看。 2. 不要掉入一个,把list 2融合进list 1里的怪圈。因为这个LinkedLi ...
分类:
其他好文 时间:
2018-11-13 20:28:23
阅读次数:
136
两种方法: 先sort,再找。time complexity: O(nlogn)如果用array记录次数,space complexity是O(n)。如果只用int来记录current length以及longest length, space complexity 是O(1) 用hashset。T ...
分类:
其他好文 时间:
2018-11-10 15:29:52
阅读次数:
116
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. Examp... ...
分类:
其他好文 时间:
2018-11-06 11:23:22
阅读次数:
183