The problem:Sort a linked list inO(nlogn) time using constant space complexity.My analysis:The is problem could be elegantly solved by using merge.The...
分类:
其他好文 时间:
2015-01-07 01:50:28
阅读次数:
112
1.切换分支:git checkout branch_name;2.合并分支:先切换到master上 ,然后执行 git merge branch_name;3.删除远程分支:git push origin :branch-name 冒号前面的空格不能少,原理是把一个空分支push到server上,...
分类:
其他好文 时间:
2015-01-07 00:30:44
阅读次数:
167
The problem:Sort a linked list inO(nlogn) time using constant space complexity.My analysis:The idea behind this problem is easy : merge sort !But we s...
分类:
其他好文 时间:
2015-01-07 00:28:58
阅读次数:
181
【题目】
Merge k sorted
linked lists and return it as one sorted list. Analyze and describe its complexity.
【分析】
无
【代码】
/*********************************
* 日期:2015-01-06
* 作者:SJF0115
* 题目:...
分类:
其他好文 时间:
2015-01-06 23:10:50
阅读次数:
202
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal...
分类:
其他好文 时间:
2015-01-06 15:28:32
阅读次数:
131
【题目】
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first
two lists.
【分析】
无
【代码】
/*******************************...
分类:
其他好文 时间:
2015-01-06 11:59:33
阅读次数:
155
题目描述:
Write a program to find the node at which the intersection of two singly linked lists begins.
For example, the following two linked lists:
A: a1 → a2
↘
...
分类:
其他好文 时间:
2015-01-06 09:56:09
阅读次数:
174
【题目】
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elem...
分类:
其他好文 时间:
2015-01-05 22:01:41
阅读次数:
238
https://oj.leetcode.com/problems/merge-sorted-array/http://blog.csdn.net/linhuanmars/article/details/19712333publicclassSolution{
publicvoidmerge(intA[],intm,intB[],intn){
//SolutionA:
//merge_NoExtraSpace(A,m,B,n);
//SolutionB:
merge_ExtraSpace(A,m,B,n);..
分类:
其他好文 时间:
2015-01-05 07:14:31
阅读次数:
141
Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially...
分类:
其他好文 时间:
2015-01-05 01:50:06
阅读次数:
218