码迷,mamicode.com
首页 >  
搜索关键字:two sum    ( 31846个结果
Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:其他好文   时间:2014-07-09 23:00:38    阅读次数:208
JS基础知识回顾:引用类型(四)
每个函数都是Function类型的实例,而且都与其他引用类型一样具有属性和方法。由于函数是对象,因此函数名实际上也是一个指向函数对象的指针,不会与某个函数绑定。函数的声明有以下三种形式:function sum(num1,num2){return num1+num2;}//利用函数声明语法定义var...
分类:Web程序   时间:2014-07-09 21:17:30    阅读次数:304
web安全之token
参考:http://blog.csdn.net/sum_rain/article/details/37085771Token,就是令牌,最大的特点就是随机性,不可预测。一般黑客或软件无法猜测出来。那么,Token有什么作用?又是什么原理呢?Token一般用在两个地方:1)防止表单重复提交、2)ant...
分类:Web程序   时间:2014-07-09 21:11:09    阅读次数:200
CTCI 2.2
Implement an algorithm to find the kth to last element of a singly linked list.Classical "Runner" Technique of linkedlist/*Use two pointers, forward o...
分类:其他好文   时间:2014-07-08 00:37:17    阅读次数:315
HDU 3473 Minimum Sum
Minimum Sum Time Limit: 16000/8000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2667    Accepted Submission(s): 609 Problem Description You are given ...
分类:其他好文   时间:2014-07-06 12:26:41    阅读次数:200
华为上机练习题--将英文号码翻译成数字号码
题目:  * 将 电话号码 one two 。。。nine zero 翻译成1  2 。。9 0  *  * 中间会有double  *  * 例如  *     输入:OneTwoThree  *     输出:123  *     输入:OneTwoDoubleTwo  *     输出:1222  *     输入:1Two2  *     输出:ERRO...
分类:其他好文   时间:2014-07-06 09:24:44    阅读次数:229
素数判定 费马测试
;; Fermat's Little Theorem: ;; If N is a prime number and A is any positive integer less ;; than N, then A raised to the N-th power is congruent to A modulo N ;; Two numbers are said to be congruent...
分类:其他好文   时间:2014-07-06 09:05:22    阅读次数:158
poj 2406 Power Strings(KMP&思维)
Power Strings Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 31093   Accepted: 12974 Description Given two strings a and b we define a*b to be their concate...
分类:其他好文   时间:2014-07-06 00:33:22    阅读次数:253
HDU 1525 博弈
Euclid's Game Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1880    Accepted Submission(s): 825 Problem Description Two players, Stan...
分类:其他好文   时间:2014-07-06 00:02:49    阅读次数:253
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!