码迷,mamicode.com
首页 >  
搜索关键字:direct path write temp    ( 55479个结果
LeetCode: Triangle
LeetCode: TriangleGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For exa...
分类:其他好文   时间:2014-08-25 22:48:14    阅读次数:306
LeetCode: Binary Tree Maximum Path Sum
LeetCode: Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree. For example:G...
分类:其他好文   时间:2014-08-25 22:34:54    阅读次数:184
/*将数组{17,82,-4,55}和数组{34,11,66,56,76}合并放入一个数组中,然后 对其中的元素进行排序。按从大到小排序。*/
#include void main(){ int a[4]={17,82,-4,55},b[5]={34,11,66,56,76},c[9],i,j,n,temp; printf("原来的第一个数组是:\n"); for(i=0;i<4;i++) { printf("%d\n",a[i]); .....
分类:其他好文   时间:2014-08-25 21:08:54    阅读次数:167
双向快速排序
#include using namespace std;void swap(int* p,int* q){ int temp = *p; *p = *q; *q = temp;}//快速排序int partition(int *ptr,int first, int last){ ...
分类:其他好文   时间:2014-08-25 21:07:04    阅读次数:268
/*有数组{2,5,6,11,15,17,22,34,45},用户输入的任意整数 是否在数组中,如果不在打印没有该数字,如果在删掉该数字,并把后面的数字依 次往前挪动,最后用数字0补位。例如:用户输入22,那么数组中的数据变化为 {2,5,6,11,15,17,34,45,0}*/
void main() { int a[9]={2,5,6,11,15,17,22,34,35},i,j,temp,x,n=1; printf("请输入一个整数:"); scanf("%d",&x); for(i=0;i<9;i++) { if(x==a[i]) { for(j...
分类:其他好文   时间:2014-08-25 21:06:54    阅读次数:236
有数组{2,5,6,11,15,17,22,34,45},将用户输入的任意整数放入数组正确的位 置中,保证顺序不能乱掉。例如:用户输入9,那么数组为{2,5,6,9,11,15,17,22 ,34,45}
#include void main(){ int a[9]={2,5,6,11,15,17,22,34,35},b[10]={0,2,5,6,11,15,17,22,34,35},x,i,j,temp; printf("请输入一个整数:"); scanf("%d",&x); b[0...
分类:其他好文   时间:2014-08-25 21:04:54    阅读次数:228
二路归并排序
#include using namespace std;void merge(int* ptr,int first, int mid, int last){ int len = last - first + 1; int *temp = new int[len]; ...
分类:其他好文   时间:2014-08-25 20:59:14    阅读次数:229
Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.N...
分类:其他好文   时间:2014-08-25 20:41:44    阅读次数:192
jquery表单验证
1、首先需要导入js包和css包:http://download.csdn.net/detail/l294333475/7816951 2、index.jsp(测试页面) <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+...
分类:Web程序   时间:2014-08-25 19:21:14    阅读次数:209
nodejs eclipse
nodejs下载地址http://nodejs.org/1.下载并安装完nodejs后,打开cmd命令窗口,输入node -v,如果正确输出版本号,就是安装成功了,如果说node不是windows的命令什么的,说明你的node启动路径没有加到path中,所以你要去修改一下环境变量,保证启动路径是在p...
分类:Web程序   时间:2014-08-25 18:27:24    阅读次数:246
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!