码迷,mamicode.com
首页 >  
搜索关键字:merge k sorted lists    ( 11722个结果
[LeetCode]Remove Duplicates from Sorted Array
[LeetCode]Remove Duplicates from Sorted Array...
分类:其他好文   时间:2014-07-08 16:07:52    阅读次数:192
【剑指offer】数组中的逆序对
# @left part: [start, mid] # @right part: (mid, end] def merge(data, start, mid, end): if mid < start or end < mid: return 0 reverse = 0 ''' @ for start, it play as the start index of left par...
分类:其他好文   时间:2014-07-08 15:04:06    阅读次数:204
分支管理策略
通常,合并分支时,如果可能,Git会用“Fast forward”模式,但这种模式下,删除分支后,会丢掉分支信息。如果要强制禁用“Fast forward”模式,Git就会在merge时生成一个新的commit,这样,从分支历史上就可以看出分支信息。下面我们实战一下--no-ff方式的merge:首...
分类:其他好文   时间:2014-07-08 00:58:29    阅读次数:202
ApiDemos-->Views-lists-slow adapter学习
今天来按照apidemos提供的方法来实现slow loading的效果. Main.java import android.app.ListActivity; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view...
分类:Windows程序   时间:2014-07-06 10:54:49    阅读次数:406
apidemos ->views/lists/Activate items 学习
看apidemos的 activate items 很简单,就是继承ListActivity, 然后给使用了 api 11中一个系统样式的textView. 然而在 API level 11 之前运行会报错.如果在11之前实现 Activateitems给出的效果,那必然要给textView 的background属性设置一个press等状态的xml来,drawable其选中的背景....
分类:Windows程序   时间:2014-07-06 09:48:15    阅读次数:410
【leetcode】sort list(python)
链表的归并排序 超时的代码 class Solution: def merge(self, head1, head2): if head1 == None: return head2 if head2 == None: return head1 # head1 and head2 point to the same link list if head1 == he...
分类:编程语言   时间:2014-07-06 09:09:51    阅读次数:275
LeetCode——Median of Two Sorted Arrays
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)). 有两个已排序的数组A和B,大小为m 和 n。 找出两数组的中...
分类:其他好文   时间:2014-07-05 22:54:17    阅读次数:244
svn恢复到之前某个版本
一直在找svn回滚的方法,这个还是很实用的,屡试不爽阿 经常由于坑爹的需求,功能要切回到之前的某一个版本。有两种方法可以实现: 方法1: 用svn merge  1) 先 svn up,保证更新到最新的版本,如20;  2) 然后用 svn log ,查看历史修改,找出要恢复的版本,如10 。如果想要更详细的了解情况,可以使用svn diff -r 10:20 [文件或目录];  3...
分类:其他好文   时间:2014-07-05 22:50:24    阅读次数:351
Leetcode Insert Interval
Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially...
分类:其他好文   时间:2014-07-05 21:45:00    阅读次数:202
排序算法系列——归并排序
记录学习点滴,菜鸟成长记归并排序的英文叫做Merge-Sort,要想明白归并排序算法,还要从“递归”的概念谈起。1.递归一般来讲,人在做决策行事的时候是往往是从已知出发,比如,我又要举个不恰当的例子了→_→:看到漂亮姑娘→喜欢人家→追→女朋友→老婆但是人家施瓦辛格不是这么想的,人家从小就立志当总统:...
分类:其他好文   时间:2014-07-05 21:32:47    阅读次数:220
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!