Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2014-06-18 17:32:02
阅读次数:
168
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-06-18 13:29:31
阅读次数:
214
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 farthest le...
分类:
其他好文 时间:
2014-06-18 12:51:52
阅读次数:
205
FP Growth算法利用了巧妙的数据结构,大大降低了Aproir挖掘算法的代价,他不需要不断得生成候选项目队列和不断得扫描整个数据库进行比对。为了达到这样的效果,它采用了一种简洁的数据结构,叫做frequent-pattern tree(频繁模式树)。...
分类:
编程语言 时间:
2014-06-18 12:22:01
阅读次数:
495
1.在Action中定义,context用于传递搜索条件和分组条件,在搜索视图中默认显示: 示例代码: Leaves Summary hr.holidays form tree,form {'search_default_group_type': 1, ...
分类:
其他好文 时间:
2014-06-18 10:22:52
阅读次数:
333
广播风暴:当网络中存在物理环路,会产生广播风暴STP协议:Spanning Tree Protocol(生成树协议) 逻辑上断开环路,防止广播风暴的产生STP算法:(所有选择都是比小-小的当选) 选择根网桥(Root Bridge):在网络中的所有交换机中选择一台 选择依据:网桥ID(网桥...
分类:
其他好文 时间:
2014-06-18 00:16:46
阅读次数:
252
由于之前合并了流程及表单分类,在高级查询和流程管理页面打开z-tree树时,前端页面报出queryAllCategory()的空指针异常(逐步调试后在该方法中无空指针异常),并报如下错误:[16/06/1407:30:07:007CST]DEBUGsql.Connection:xxxConnectionClosedorg.codehaus.jackson.map.Json..
分类:
其他好文 时间:
2014-06-17 17:41:14
阅读次数:
190
二叉树的插入与删除,来自Mark Allen Weiss的《数据结构与算法分析》。# Definition for a binary tree nodeclass TreeNode: def __init__(self, x): self.val = x self...
分类:
编程语言 时间:
2014-06-17 14:25:01
阅读次数:
291
1、介绍 ?决策树(decision tree)是一种有监督的机器学习算法,是一个分类算法。在给定训练集的条件下,生成一个自顶而下的决策树,树的根为起点,树的叶子为样本的分类,从根到叶子的路径就是一个样本进行分类的过程。 ?下图为一个决策树的例子,见http://zh.wikipedia.org/w...
分类:
其他好文 时间:
2014-06-17 13:17:44
阅读次数:
281
简单来说,就是二叉树的前序、中序、后序遍历,包括了递归和非递归的方法前序遍历(注释中的为递归版本): 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 struct TreeNode 9 {1...
分类:
其他好文 时间:
2014-06-17 12:53:42
阅读次数:
416