码迷,mamicode.com
首页 >  
搜索关键字:complexity    ( 1097个结果
LeetCode–Flip Game
若是连着的"++", 就把这段用"--"替代放到res中. Note: 当i == s.length()-1走到最后一位时. s.substring(i+1), 不会out of index, 会返回"". 但再大就不行了. Time Complexity: O(n). Space: O(1) re ...
分类:其他好文   时间:2018-07-30 00:36:13    阅读次数:104
LeetCode – Group Shifted Strings
与Group Anagrams类似. 维护一个HashMap, key是每个string 的 base型. Time Complexity: O(n * strings.length), n 是每个string的平均长度. Space: O(hm.size()), HashMap size. ...
分类:其他好文   时间:2018-07-23 00:07:36    阅读次数:145
DDD领域驱动设计基本理论知识总结
领域驱动设计之领域模型 加一个导航,关于如何设计聚合的详细思考,见这篇文章。 2004年Eric Evans 发表Domain-Driven Design –Tackling Complexity in the Heart of Software (领域驱动设计),简称Evans DDD。领域驱动设 ...
分类:其他好文   时间:2018-07-20 11:38:37    阅读次数:159
Longest Consecutive Sequence--记录区间信息
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-07-16 23:11:51    阅读次数:185
哈工大 软件构造课程 复习考点总结(第六、七章)
可维护性的常见度量指标 Cyclomatic complexity 圈复杂度 Lines of Code LoC 代码行数 Maintainability Index (MI) 可维护性指数 Depth of Inheritance 继承的层次数 Class Coupling 类之间的耦合度 Uni... ...
分类:其他好文   时间:2018-06-24 10:28:25    阅读次数:222
128. Longest Consecutive Sequence
问题描述: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. ...
分类:其他好文   时间:2018-06-17 10:57:20    阅读次数:142
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). Example: Note: If t ...
分类:Windows程序   时间:2018-06-13 11:34:14    阅读次数:188
算法效率 简单的增长率 参照
1、 时间复杂度(Time Complexity) 一般情况下,算法中的基本操作重复执行次数是问题规模n的某个函数 f(n) ,算法的时间度量记作: T(n) = O(f(n)) 它表示随问题规模n的增大,算法执行时间的增长率和 f(n) 的增长率相同,称做算法的逐渐时间复杂度,简称时间复杂度。 在 ...
分类:编程语言   时间:2018-06-12 22:57:49    阅读次数:202
Search in Rotated Sorted Array II LeetCode Java
描述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 functi ...
分类:编程语言   时间:2018-06-11 17:07:51    阅读次数:103
148. Sort List
问题描述: Sort a linked list in O(n log n) time using constant space complexity. Example 1: Example 2: 解题思路: 说到O(nlogn)那就必然想到快速排序和归并排序和堆排序 参考大佬整理的方法 代码: 归 ...
分类:其他好文   时间:2018-06-11 11:01:16    阅读次数:176
1097条   上一页 1 ... 8 9 10 11 12 ... 110 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!