This problem, as stated in the problem statement, has a lot of solutions. Since the problem requires us to solve it in O(1) space complexity, I only s...
分类:
其他好文 时间:
2015-07-17 08:23:43
阅读次数:
116
领域驱动设计之领域模型加一个导航,关于如何设计聚合的详细思考,见这篇文章。2004年Eric Evans 发表Domain-Driven Design –Tackling Complexity in the Heart of Software (领域驱动设计),简称Evans DDD。领域驱动设计分...
分类:
其他好文 时间:
2015-07-15 14:44:09
阅读次数:
234
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-07-15 12:58:41
阅读次数:
94
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...
题目: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 ...
分类:
其他好文 时间:
2015-07-14 17:38:45
阅读次数:
128
题目:Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose a s...
分类:
其他好文 时间:
2015-07-13 22:02:44
阅读次数:
124
There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should...
分类:
其他好文 时间:
2015-07-12 17:22:50
阅读次数:
108
题目:Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function...
分类:
其他好文 时间:
2015-07-10 18:28:45
阅读次数:
105
题目:
Merge k sorted
linked lists and return it as one sorted list. Analyze and describe its complexity.
题意:
合并 K 个有序的链表,把他们合并成为一个有序链表。分析并描述它的复杂度。
算法分析:
先将k个链表转化为数组,合并,之后利用Collections.sort()排序。...
分类:
编程语言 时间:
2015-07-10 15:26:45
阅读次数:
113
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 ord...
分类:
其他好文 时间:
2015-07-09 19:23:39
阅读次数:
96