码迷,mamicode.com
首页 >  
搜索关键字:dfs    ( 10564个结果
Leetcode bfs&dfs Binary Tree Postorder Traversal II
Binary Tree Level Order Traversal II  Total Accepted: 16983 Total Submissions: 54229My Submissions Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie...
分类:其他好文   时间:2014-09-05 18:22:41    阅读次数:212
Leetcode bfs&dfs Binary Tree Postorder Traversal
Binary Tree Level Order Traversal  Total Accepted: 20571 Total Submissions: 66679My Submissions Given a binary tree, return the level order traversal of its nodes' values. (ie, from left t...
分类:其他好文   时间:2014-09-05 18:22:21    阅读次数:271
ZOJ--3602--Count the Trees【DFS+Hash】树的同构
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3602 题意:给出一棵有n个节点的二叉树和一棵有m个节点的二叉树,给出每个节点的左右子树信息,问这两棵树有几个相同的子树。 思路:树的同构,比赛时没想法,赛后看的别人的解题报告。实际上是给每个节点的左右子树一个哈希值,不用像字符串哈希那么麻烦,直接给每个子树...
分类:其他好文   时间:2014-09-05 18:18:31    阅读次数:251
hadoop优化
hadoop分散磁盘I/O配置dfs.data.dir,将其值配置为多块磁盘<key>dfs.data.dir</key><value>/data/data1,/data/data2,/data/data3</value>####假设多块磁盘被挂在以上目录中2.mapreduce中间数据临时文件分散写老的配置参数为,mapred.local.dir,新配置..
分类:其他好文   时间:2014-09-05 16:25:12    阅读次数:163
Leetcode dfs Sum Root to Leaf Numbers
Sum Root to Leaf Numbers  Total Accepted: 20237 Total Submissions: 67979My Submissions Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a numbe...
分类:其他好文   时间:2014-09-05 16:12:01    阅读次数:200
POJ 3352 & 3177 无向图的边-双连通分量(无重边 & 重边)
POJ 3352 Road Construction  链接:http://poj.org/problem?id=3352 题意:给定一张连通的无向图,无重边。问最少加入多少条边之后,使得原图之中的任意两点之间都有两条以上的“边不重复”的路径。 思路:首先可以通过求割点的方式对该图进行一次dfs。dfs之后,所有位于同一个边-双连通分量的点的low值相同。这样就能够将一个边-...
分类:其他好文   时间:2014-09-05 16:10:11    阅读次数:158
Leetcode dfs Binary Tree Postorder Traversal
Binary Tree Postorder Traversal  Total Accepted: 28560 Total Submissions: 92333My Submissions Given a binary tree, return the postorder traversal of its nodes' values. For example: Given...
分类:其他好文   时间:2014-09-05 16:09:01    阅读次数:172
usaco-2.3-zerosum-pass
递归,递归:/*ID: qq104801LANG: C++TASK: zerosum*/#include #include #include #include #include #include using namespace std;int N;void dfs(int n,int sum,int...
分类:其他好文   时间:2014-09-05 15:45:21    阅读次数:164
hdu----(2586)How far away ?(DFS/LCA/RMQ)
How far away ?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5492Accepted Submission(s): 2090Prob...
分类:其他好文   时间:2014-09-05 15:41:21    阅读次数:222
目前配过的规模最大的HDFS
Configured Capacity: 249915348971520 (227.30 TB) Present Capacity: 153799153632972 (139.88 TB) DFS Remaining: 153799146688512 (139.88 TB) DFS Used: 6944460 (6.62 MB) DFS Used%: 0.00% Under replicated blocks: 0 Blocks with corrupt replicas: 0 Missing blocks...
分类:其他好文   时间:2014-09-05 10:03:11    阅读次数:257
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!