l 树:满足以下条件: 有且仅有一个根节点。 当节点数大于1时,除根节点为其余节点可以划分为m个互不相交的有限集,其中每一个集合本身又是一棵树,称为子树。 l 概念 Node结点 Degree结点的度 Leaf 叶子结点 分支结点 孩子结点child 父节点 兄弟节点 树的度 结点的层次 树的高度 ...
分类:
其他好文 时间:
2019-10-06 20:32:43
阅读次数:
113
112. Path Sum Easy Easy Easy 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 ...
分类:
其他好文 时间:
2019-10-03 16:18:59
阅读次数:
72
一、决策树 决策树(decision tree)是一种基本的分类与回归方法。 决策树由结点(node)和有向边(directed edge)组成。 结点有两种类型:内部结点(internal node)和叶结点(leaf node)。 内部结点表示一个特征或属性,叶结点表示一个类。 1、决策树的构建 ...
分类:
其他好文 时间:
2019-09-26 17:30:43
阅读次数:
275
"题目链接" Implementation c++ int n, q; scan(n,q); vi p(n + 1); vi nson(n + 1); up (i, 1, n) { scan(p[i]); nson[p[i]]++; } vi leaf; up (i, 1, n) { if (nso ...
分类:
其他好文 时间:
2019-09-23 22:35:47
阅读次数:
124
应用统计学 对类别数据要分类处理: Bar chart复式条形图便于对比: Pareto chart:对类别变量依据频数高低排列: Pie chart:饼图用于一个样本,可以区分类别数据 doughnut chart:环形图用于多个样本,可以区别类别数据 顺序数据:通过计算cumulative pe ...
分类:
其他好文 时间:
2019-09-16 10:18:03
阅读次数:
104
path sum 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 give... ...
分类:
其他好文 时间:
2019-09-14 22:50:59
阅读次数:
113
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 sum. N ...
分类:
其他好文 时间:
2019-09-04 09:29:30
阅读次数:
78
Problem Statement Given a binary tree, return all root-to-leaf paths. Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with ...
分类:
其他好文 时间:
2019-09-01 10:45:06
阅读次数:
59
题目描述 Given a positive integer k, we define a rooted tree to be k-perfect, if and only if it meets both conditions below:?Each node is either a leaf no ...
分类:
其他好文 时间:
2019-09-01 10:44:51
阅读次数:
113
Given a rooted binary tree, return the lowest common ancestor of its deepest leaves. Recall that: The node of a binary tree is a leaf if and only if i ...
分类:
其他好文 时间:
2019-08-23 00:01:48
阅读次数:
99