Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initial...
分类:
其他好文 时间:
2014-08-19 10:52:14
阅读次数:
307
Given a collection of intervals, merge all overlapping intervals.For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,18].在LeetCode“...
分类:
其他好文 时间:
2014-08-19 10:50:54
阅读次数:
247
Selection:selection is a trivial problem if the input numbers are sorted. If we use a sorting algorithm having O(nlgn) worst case running time, then t...
分类:
其他好文 时间:
2014-08-19 04:50:43
阅读次数:
200
普通的归并排序,需要一个额外的数组来保存每次merge的结果;如果要求不使用额外空间,那么每次merge的时候需要做一些处理。思路:合并left[] 和 right[]时,假如right[0]应该放入left[3],那么:①可以用一个var来保存right[0],然后将left[3]之后的元素右移一...
分类:
其他好文 时间:
2014-08-19 00:54:23
阅读次数:
268
求两个已排过序的等长的数组的中位数(median of two sorted arrays)...
分类:
其他好文 时间:
2014-08-18 18:46:33
阅读次数:
337
Description
The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b + c + d = 0 . ...
分类:
其他好文 时间:
2014-08-18 18:43:52
阅读次数:
210
Meld是一款可视化的文件及目录对比(diff) / 合并 (merge) 工具,通过它你可以对两个或三个文件/目录进行对比,并以图形化的方式显示出它们的不同之处,同时还提供编辑及合并功能,另外还支持 CVS, Subversion, Bazaar-ng 和 Mercurial 等版本控制工具。项目...
分类:
其他好文 时间:
2014-08-18 18:23:12
阅读次数:
255
①原题 There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). ②乡村英语翻译一下 给你两个...
分类:
其他好文 时间:
2014-08-18 16:40:32
阅读次数:
155
归并(Merge)排序法是将两个(或两个以上)有序表合并成一个新的有序表,即把待排序序列分为若干个有序的子序列,再把有序的子序列合并为整体有序序列。归并排序是建立在归并操作上的一种有效的排序算法。该算法是采用分治法(Divide and Conquer)的一个非常典型的应用。将已有序的子序列合并,得到完全有序的序列;即先使每个子序列有序,再使子序列段间有序。若将两个有序表合并成一个有序表,称为二路...
分类:
其他好文 时间:
2014-08-18 12:32:04
阅读次数:
230
2014-08-16 BaoXinjian一、SQL Tunning类1. 列举集中表的连接方式Answer:等连接(内连接)、非等连接、自连接、外连接(左、右、全)Or hash join/merge join/nest loop(cluster join)/index join ??连接类型定义...
分类:
数据库 时间:
2014-08-18 12:11:14
阅读次数:
398