码迷,mamicode.com
首页 >  
搜索关键字:merge two sorted lists    ( 21789个结果
jsp两种include指令区别
【转】:http://www.cnblogs.com/lazycoding/archive/2011/04/04/two_include.html<%@ include file=”relativeURI”%><jsp:include page=”relativeURI” flush=”true” ...
分类:Web程序   时间:2014-05-29 01:50:53    阅读次数:242
LeetCode --- Add Two Numbers
题目链接说来算是个基础题目,可是还是各种CE,各种WA,基础还是不扎实。附上代码: 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *ne...
分类:其他好文   时间:2014-05-28 23:56:38    阅读次数:382
对python生成器特性使用的好例子
1.对序列进行分组的函数(摘自web.py源码utils.py文件中) 1 def group(seq, size): 2 """ 3 Returns an iterator over a series of lists of length size from iterable. ...
分类:编程语言   时间:2014-05-28 04:21:00    阅读次数:365
git merge branch
git branch look at your branchesgit branch newbranchgit checkout newbrachdo somethinggit checkout mastergit merge newbranchgit branch -d newbrach
分类:其他好文   时间:2014-05-27 16:09:01    阅读次数:227
LeetCode: Two Sum 题解
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:其他好文   时间:2014-05-26 19:50:39    阅读次数:314
UVA Tree Summing
题目如下:  Tree Summing  Background LISP was one of the earliest high-level programming languages and, withFORTRAN, is one of the oldest languages currently being used. Lists,wh...
分类:其他好文   时间:2014-05-25 21:39:51    阅读次数:276
LeetCode:Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are   stored in  reverse order and each of their nodes contain a single digit. Add the two numbers   and return i...
分类:其他好文   时间:2014-05-25 21:36:52    阅读次数:268
[leetcode]_Remove Duplicates from Sorted Array II
题目:一个有序数组,要求保证数组中的每个元素不能超过2个。 输入:A =[1,1,1,2,2,3] 输出:length =5, and A is now[1,1,2,2,3]思路:双指针 。有些绕,不过理清了后,思路还是很直接明朗的。1、两个指针:p和help。初始化时同时指向数组头。变量cur.....
分类:其他好文   时间:2014-05-25 16:15:16    阅读次数:285
[leetcode]_Merge Sorted Array
题目:合并两个有序数组A , B,将合并后的数组存到A中。假设A的空间足够装下A和B所有的元素。思路:这道题考虑如果正向扫描两个数组,则每插入一个元素,则需移动A后的所有元素。换个角度想,既然元素个数一定,则从尾部扫描两个数组,依次放入到A的尾部,这样既不会产生大量元素的移动,也不会造成A中元素被覆...
分类:其他好文   时间:2014-05-25 15:09:32    阅读次数:222
【DOM】1.DOM优化
1.JS include :DOM BOM ECMA2.Browser 分别独立实现dom & JSas if two isolated islands3.JS操作DOMfrom the island to the other one4.DOM性能The bridges between island...
分类:其他好文   时间:2014-05-25 11:28:12    阅读次数:246
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!