码迷,mamicode.com
首页 >  
搜索关键字:algorithm trading    ( 11829个结果
LeetCode: Single Number Ⅱ
Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime ...
分类:其他好文   时间:2014-05-27 00:10:26    阅读次数:319
php实现MD5withRSA签名算法
不知道怎么获得RSA公钥和私钥的先看我之前这篇 http://www.cnblogs.com/kennyhr/p/3746048.html不清楚RSA算法的推荐看阮老师的http://www.ruanyifeng.com/blog/2013/06/rsa_algorithm_part_one.htm...
分类:Web程序   时间:2014-05-26 15:47:28    阅读次数:245
First Missing Positive
Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should ru...
分类:其他好文   时间:2014-05-26 09:43:14    阅读次数:220
【leetcode】Simplify Path
题目:将给定的路径名简化,返回最简形式。 path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c" 虽然咋看起来比较杂乱,但还是比较整齐的,每个部分由‘/‘进行分割,就像文本处理中,由空格或tab分割的单词一样,对得到的不同的分割此进行不同的处理。得到的可能的分割词包括: string simplifyP...
分类:其他好文   时间:2014-05-26 06:13:24    阅读次数:213
2014辽宁ACM省赛 Distance
问题 E: Distance 时间限制: 1 Sec  内存限制: 128 MB 提交: 48  解决: 12 [提交][状态][论坛] 题目描述 There is a battle field. It is a square with the side length 100 miles, and unfortunately we have two comrades who get ...
分类:其他好文   时间:2014-05-26 05:57:27    阅读次数:325
【leetcode】Unique Paths II
题目:与版本一不同的是,这里给定了一个矩阵,矩阵中元素为0的点表示该点可达,为1的点表示不可达,当然,不可达也就意味着不可经过。以左上角为出发点,右下角为目标终点,可行的不同路径有多少。 分析: 在Uniqu Paths I 的基础上,加上对矩阵可达性的判断就可以了。 注意: 1.左上角的元素是1的时候,即出发点就不可达,即出发不了,倒在了起跑线上。 2.给定的矩阵是1*1的形式。 3...
分类:其他好文   时间:2014-05-26 05:48:24    阅读次数:247
LeetCode:3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exact...
分类:其他好文   时间:2014-05-25 00:46:51    阅读次数:229
Unique Paths
题目:给定一个由参数m,n表示行数和列数而形成的2维表格,以左上为出发点,右下为目的地,每次只能向右走一步,或者向下走一步,算出总共存在多少不同的到达路径。 分析;这个问题的递归属性是很明显的,因为无论向右走还是向下走,到达一个新的位置,这时就变成了在该新位置到达目的地有多少不同的路径。其次,向右走和向下走是不同的路径,最终的结果应该是二者的和。 递归的返回条件:n = 1 或 m = 1, ...
分类:其他好文   时间:2014-05-24 21:58:45    阅读次数:243
2014辽宁ACM省赛 Prime Factors
问题 L: Prime Factors 时间限制: 1 Sec  内存限制: 128 MB 提交: 36  解决: 28 [提交][状态][论坛] 题目描述 I'll give you a number , please tell me how many different prime factors in this number. 输入 There is multiple te...
分类:其他好文   时间:2014-05-24 20:52:54    阅读次数:311
【leetcode】Interleaving String
题目:给定三个串str1,str2,str3,判断str3是否是str1,str2的交叉字符串。 交叉字符串:两个字符串的字符交叉,组成新的字符串,要求属于原来字符串中的字符在新的生成的交叉字符串中的顺序与原顺序相同。即若a、b在源字符串中时a在前面,那么在新的字串中时,a也的在b的前面。 回想问题Distinct Subsequences,其形式表示为 S --通过合理的规则----得到...
分类:其他好文   时间:2014-05-24 18:14:24    阅读次数:284
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!