码迷,mamicode.com
首页 >  
搜索关键字:algorithm trading    ( 11829个结果
Single Number
Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runti...
分类:其他好文   时间:2014-07-22 23:07:14    阅读次数:337
快速排序(Quicksort)的Javascript实现(转载)
日本程序员norahiko,写了一个排序算法的动画演示,非常有趣。这个周末,我就用它当做教材,好好学习了一下各种排序算法。排序算法(Sorting algorithm)是计算机科学最古老、最基本的课题之一。要想成为合格的程序员,就必须理解和掌握各种排序算法。目前,最常见的排序算法大概有七八种,其中"...
分类:编程语言   时间:2014-05-01 11:33:13    阅读次数:595
快速排序
package algorithm.sort;public class QuickSort { public static void main(String[] args) { int[] a = new int[] {5, 3, 7, 2, 1, 4, 9, 8, 6, 1}; sort(a); ...
分类:其他好文   时间:2014-05-01 03:33:20    阅读次数:330
计数排序
package algorithm.sort;public class CountingSort { public static void main(String[] args) { int[] a = new int[] {5, 3, 7, 2, 1, 4, 9, 8, 6, 1}; int[] ...
分类:其他好文   时间:2014-05-01 03:25:05    阅读次数:252
堆排序
package algorithm.sort;public class HeapSort { public static void main(String[] args) { int[] a = new int[] {5, 3, 7, 2, 1, 4, 9, 8, 6, 1}; sort(a); p...
分类:其他好文   时间:2014-05-01 03:24:04    阅读次数:332
《Cracking the Coding Interview》——第17章:普通题——题目2
2014-04-28 22:05题目:写个程序判断三连棋哪一方赢了。解法:三个相同的棋子连成一条横线,竖线或者对角线就判断为赢了。代码: 1 // 17.2 Write an algorithm to check if someone has won the tic-tac-toe game. 2 ...
分类:其他好文   时间:2014-04-29 18:12:07    阅读次数:474
《Cracking the Coding Interview》——第17章:普通题——题目8
2014-04-28 23:35题目:最大子数组和问题。解法:O(n)解法。代码: 1 // 17.8 Find the consecutive subarray with maximum sum in an array. 2 // O(n) online algorithm. 3 #include...
分类:其他好文   时间:2014-04-29 16:35:28    阅读次数:429
OpenCV2马拉松第2圈——读写图片
在本次马拉松中,你将学会 用imread读取图片用nameWindow和imshow展示图片cvtColor彩色图像灰度化imwrite写图像Luv色彩空间转换 图像读取接口 image = imread(argv[1], CV_LOAD_IMAGE_COLOR); CV_LOAD_IMAGE_UNCHANGED (CV_LOAD_IMAGE_GRAYSCALE ( 0...
分类:其他好文   时间:2014-04-27 22:47:19    阅读次数:342
hdu1211
RSA is one of the most powerful methods to encrypt data. The RSA algorithm is described as follow: > choose two large prime integer p, q > calculate n = p × q, calculate F(n) = (p - 1) × (q - 1) ...
分类:其他好文   时间:2014-04-27 21:37:59    阅读次数:315
11829条   上一页 1 ... 1181 1182 1183
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!