码迷,mamicode.com
首页 >  
搜索关键字:direct path write temp    ( 55479个结果
用C#写的几种排序算法
1、冒泡法排序class Program{//冒泡法排序public static void sort(int[] list){int i, j, temp;j = 1;while (j list[i + 1]){temp = list[i];list[i] = list[i + 1];list[....
分类:其他好文   时间:2014-07-31 13:00:46    阅读次数:152
【足迹C++primer】58、Template Parameter
Template Parameter #include #include #include #include #include #include using namespace std; template Foo calc(const Foo &a, const Foo &b) { Foo temp=a; //... return temp; } ///Templa...
分类:编程语言   时间:2014-07-31 09:55:46    阅读次数:252
控制台
输出:Console.Write("hello");换行输出:Console.WriteLine("hello");获取输入的值:Console.ReadLine()控制台不关闭:Console.ReadKey();占位符:Console.WriteLine("Sum:{1} Minus:{0} R...
分类:其他好文   时间:2014-07-31 09:35:45    阅读次数:217
Path Sum II leetcode java
题目:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and ....
分类:编程语言   时间:2014-07-31 05:22:15    阅读次数:287
Path Sum leetcode java
题目:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given su....
分类:编程语言   时间:2014-07-31 05:21:25    阅读次数:214
Maximum Depth of Binary Tree leetcode java
题目:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthes....
分类:编程语言   时间:2014-07-31 02:41:15    阅读次数:229
Minimum Depth of Binary Tree leetcode java
题目:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the neares....
分类:编程语言   时间:2014-07-31 02:30:25    阅读次数:264
Same Tree leetcode java
题目:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identica....
分类:编程语言   时间:2014-07-31 02:24:15    阅读次数:211
HDU 4889 Scary Path Finding Algorithm
题意: 构造一幅图  使题中给出的程序按该图执行  最终变量doge大于输入的C跳出 思路: 出题人思维简直神了!  实在是膜拜!  借题解的图: 按照图中所画  可以继续向右延伸 为何这样可以??  为何边权要这么取?? 先回答第二个问题: 取负数是为了可以不断的去更新  例如如果走了上面的-4那条边  那么它右边的所有点就又可以再更新一次  这样使更新达到了指数级...
分类:其他好文   时间:2014-07-31 00:08:45    阅读次数:300
Exponentiation UVA 748
//算法:获得无小数点的输入串,然后对该串进行普通的高精度乘法运算 //运算得到结果后,添加小数点,最后除去串头和串尾的0即可 #include #define MAXN 200 char R[10]; char E[6];//寄存无小数点的输入串 char temp[MAXN]; char ans[MAXN];//寄存答案串 int n,left; void multip(); int ...
分类:其他好文   时间:2014-07-31 00:08:15    阅读次数:269
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!