计算N个节点的BST树有多少种 经典的DP了,dp[n]表示n个节点的树有dp[n]种,dp方程见代码 class?Solution?{
public:
????int?numTrees(int?n)?{
???????vector<int>?dp(n+1);
???????dp[...
分类:
其他好文 时间:
2015-09-09 13:37:41
阅读次数:
148
1066. Root of AVL Tree (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAn AVL tree is a self-balancing binary search tree. In an AVL tre...
分类:
其他好文 时间:
2015-09-09 13:04:11
阅读次数:
156
Problem:Implementint sqrt(int x).Compute and return the square root ofx.Conclusion for Binary Search Problem:Binary search is such an elegant way of s...
分类:
其他好文 时间:
2015-09-09 11:21:36
阅读次数:
138
1.show命令语法SHOW {BINARY | MASTER} LOGSSHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]SHOW CHARACTER SET [like_or_where]SHOW C...
分类:
数据库 时间:
2015-09-09 11:15:52
阅读次数:
189
人工智能遵循着:感知->思考->行动
决策方法:有限状态机(Finite-State Machines),分层状态机(Hierarchical Finite-State Machines),行为树(Behavior Trees),效用系统(Utility Systems),目标导向型行动计划(Goal-Oriented Action Planners),分层任务网络(Hierarchical...
分类:
其他好文 时间:
2015-09-09 08:34:24
阅读次数:
220
人工智能遵循着:感知->思考->行动决策方法:有限状态机(Finite-State Machines),分层状态机(Hierarchical Finite-State Machines),行为树(Behavior Trees),效用系统(Utility Systems),目标导向型行动计划(Goal...
分类:
其他好文 时间:
2015-09-09 08:32:02
阅读次数:
199
题目:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total n...
分类:
其他好文 时间:
2015-09-08 21:54:06
阅读次数:
164
Invert Binary Tree翻转二叉树下面我们分别用java和python实现两种解决方案(两种解决方案可以完全用java或python实现:方案一:(java)/*** Definition for a binary tree node.* public class TreeNode {*...
分类:
其他好文 时间:
2015-09-08 21:49:05
阅读次数:
139
#235Lowest Common Ancestor of a Binary Search Tree寻找二叉搜索树两个节点的最小共同祖先java代码:/*** Definition for a binary tree node.* public class TreeNode {* int val.....
分类:
其他好文 时间:
2015-09-08 21:41:18
阅读次数:
122
参考资料:http://www.92csz.com/study/linux/【Linux系统目录结构】 登录系统后,在当前命令窗口下输入ls /你会看到 以下是对这些目录的解释: /bin bin是Binary的缩写。这个目录存放着最经常使用的命令。 /boot这里存放的是启动Linux时使...
分类:
系统相关 时间:
2015-09-08 19:47:23
阅读次数:
234