码迷,mamicode.com
首页 >  
搜索关键字:merge two sorted lis    ( 37279个结果
Swap Nodes in Pairs
Link:http://oj.leetcode.com/problems/swap-nodes-in-pairs/Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2-...
分类:其他好文   时间:2014-05-05 22:45:37    阅读次数:331
【LeetCode OJ】Word Ladder I
Problem Link:http://oj.leetcode.com/problems/word-ladder/Two typical techniques are inspected in this problem:Hash Table. One hash set is the words di...
分类:其他好文   时间:2014-05-05 22:44:44    阅读次数:393
经典白话算法之归并排序
void Merge(int A[],int p,int q,int r){ int i,j,k; //计算子数组A[p..q]的元素个数 int n1 = q - p + 1; //计算子数组A[q+1..r]元素个数 int n2 = r - q; //创建子数组L,R int* L = (int*)malloc(sizeof(int)*...
分类:其他好文   时间:2014-05-04 12:44:38    阅读次数:384
redis在windows下安装和PHP中使用
windows下安装redis1、redis简介redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)和hashs(哈希类型)。这些数据类型...
分类:Windows程序   时间:2014-05-04 12:37:46    阅读次数:848
一道模拟题
问题:把英文单词表示的数字转换为阿拉伯数字,要求数字不超过整形范围,数字形如abc,def,hrg。第一行表示有几组数据,第二行输入英文。输出:相应的阿拉伯数字。例如:input: 3 eleven one hundred and two output: 11102分析:要注意百万和千要断位,还有要...
分类:其他好文   时间:2014-05-04 12:32:10    阅读次数:326
emacs
ielm
分类:其他好文   时间:2014-05-03 22:32:02    阅读次数:224
codechef Sums in a Triangle题解
Let's consider a triangle of numbers in which a number appears in the first line, two numbers appear in the second line, three in the third line, etc. Develop a program which will compute the largest ...
分类:其他好文   时间:2014-05-03 17:32:22    阅读次数:284
JQuery_2.1.0_日记 5.2
$.方法 (1)$.merge(first, second)     合并两个数组或类数组,将第二个数组添加到第一个数组的末尾 (2)$.grep(elems, callback, invert)     使用callback对elems进行过滤,如果invert设置为true.则返回保留callback返回值为false的元素数组,如果invert设置为false则返回c...
分类:Web程序   时间:2014-05-03 16:37:05    阅读次数:333
codechef The Lead Game 题解
The game of billiards involves two players knocking 3 balls around on a green baize table. Well, there is more to it, but for our purposes this is sufficient. The game consists of several rounds ...
分类:其他好文   时间:2014-05-03 16:15:33    阅读次数:296
codechef Enormous Input Test 快速读入数据 fread
本题就是测试读入数据的速度的。 如果有大量的数据读入,使用cin是很慢的。 那么使用scanf那么会快很多,但是如果数据量更大的话那么就还是不够快了。 所以这里使用fread。 首先开一个buffer,然后使用fread大块大块地读入数据就可以非常快地读入了。 题目如下: Input The input begins with two positive...
分类:其他好文   时间:2014-05-03 16:13:21    阅读次数:340
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!