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 ...
分类:
其他好文 时间:
2017-07-10 20:19:18
阅读次数:
163
DescriptionMerge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 多路排序的一个例子,用优先权队列保存指针,每次选出有最小的权值的指针,将其指向的... ...
分类:
其他好文 时间:
2017-07-02 10:14:56
阅读次数:
205
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 ...
分类:
其他好文 时间:
2017-07-01 20:12:57
阅读次数:
207
持续集成篇 SonarQube 代码质量管理平台的安装 1、SonarQube的介绍 SonarQube是一个管理代码质量的开放平台。 可以从七个维度检测代码质量(为什么要用SonarQube): (1) 复杂度分布(complexity):代码复杂度过高将难以理解、难以维护 (2) 重复代码(du ...
分类:
其他好文 时间:
2017-06-29 17:31:09
阅读次数:
183
什么是领域驱动设计(DDD) 2004年著名建模专家Eric Evans发表了他最具影响力的书籍:《Domain-Driven Design: Tackling Complexity in the Heart of Software》(中文译名:领域驱动设计:软件核心复杂性应对之道),书中提出了领域 ...
分类:
其他好文 时间:
2017-06-29 11:24:48
阅读次数:
274
题目描述 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 ="ADOB ...
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. 思路:这题最容易想到的是,(假设有k个链表)链表1、2合并,然后其结果12和3合并,以此类推,最后是1 ...
分类:
编程语言 时间:
2017-06-19 20:54:49
阅读次数:
238
Sort a linked list in O(n log n) time using constant space complexity. 时间复杂度为O(nlogn),可以想到归并排序、快排、桶排序。 思路:使用归并排序,整体可以分为两体,一、构造两个已排序的子链表;二、将子链表合并。针对第一部 ...
分类:
编程语言 时间:
2017-06-15 10:41:29
阅读次数:
202
题目: Sort a linked list in O(n log n) time using constant space complexity. 链接: http://leetcode.com/problems/sort-list/ 6/12/2017 10ms, 24%,merge sort, ...
分类:
其他好文 时间:
2017-06-13 10:03:42
阅读次数:
134
领域驱动设计之领域模型 加一个导航,关于如何设计聚合的详细思考,见这篇文章。 2004年Eric Evans 发表Domain-Driven Design –Tackling Complexity in the Heart of Software (领域驱动设计),简称Evans DDD。领域驱动设 ...
分类:
其他好文 时间:
2017-06-09 21:30:38
阅读次数:
252