原题:UVA 1172 http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3613动态规划问题。定义: dp[i] = 右岸前i个村庄(m岸)能够与左岸(n岸)...
分类:
其他好文 时间:
2014-07-07 17:13:26
阅读次数:
260
Problem Description:Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.Solution: 递归。 1 public List>...
分类:
其他好文 时间:
2014-07-07 16:59:12
阅读次数:
169
Problem Description:Given a binary tree, return thepostordertraversal of its nodes' valuesSolution: 1 public List postorderTraversal(TreeNode root) { ...
分类:
其他好文 时间:
2014-07-07 16:45:23
阅读次数:
177
树的层次遍历,比较简单,3个题的做法完全一样,只是在特定的地方对结果进行reverse。1、Binary Tree Level Order Traversal/** * Definition for binary tree * struct TreeNode { * int val; * ...
分类:
其他好文 时间:
2014-07-07 16:39:56
阅读次数:
194
Problem Description:Given a binary tree, return thepreordertraversal of its nodes' values.Solution: 1 public List preorderTraversal(TreeNode root)...
分类:
其他好文 时间:
2014-07-07 16:34:34
阅读次数:
208
非常简单的一道题/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x...
分类:
其他好文 时间:
2014-07-07 16:25:49
阅读次数:
220
Problem Description:Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf ...
分类:
其他好文 时间:
2014-07-07 16:01:34
阅读次数:
223
Problem Description:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below bina...
分类:
其他好文 时间:
2014-07-07 15:57:05
阅读次数:
252
Problem Description:Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your pr...
分类:
其他好文 时间:
2014-07-07 15:46:01
阅读次数:
267
一、下载InstantClient地址:http://www.oracle.com/technology/software/tech/oci/instantclient/index.htmlinstantclient-basic-nt-12.1.0.1.0(一定要下win32位的客户端)二、解压缩解压到C:\instantclient_12_1三、设置变量计算机,右键“属性”—高级系统设置—高级—点击..
分类:
数据库 时间:
2014-06-29 21:26:26
阅读次数:
481