二叉树中序遍历 递归实现: 非递归实现。 分析: 1,使用堆栈作为存储结构 2, 当节点不为空或者堆栈,每次根据给定节点对其左子树进行入栈。 3,出栈,并且保存节点值,然后将右节点赋给当前节点(不用判断是否为空,若为空,刚好不用进行左节点遍历的步骤) ...
分类:
其他好文 时间:
2019-10-28 01:17:25
阅读次数:
86
https://github.com/Kakadu/Qt_libusb https://github.com/mcvsama/libusbcc/tree/master/src/libusbcc https://github.com/tianxiejack/libusbTest/blob/master ...
分类:
其他好文 时间:
2019-10-28 00:51:02
阅读次数:
83
dsu on tree. $\rm 0x01$ 前言$\&$技术分析 $\bold{dsu~on~tree}$,中文别称“树上启发式合并”(虽然我并不承认这种称谓),大概是一种优雅的暴力,并且跟$dsu$毫无关系。于是我打算叫他$\bold{Elegantly~Direct~Counting~on~ ...
分类:
其他好文 时间:
2019-10-27 23:09:40
阅读次数:
114
03 》树形组件 <el-tree :data="treeData" //传递过来的数据 :props="defaultProps" //人家要求的 :default-expand-all="showall" //是否页面一加载就展示所有的子节点 默认是false。表示不展示 :expand-on- ...
分类:
其他好文 时间:
2019-10-27 22:28:11
阅读次数:
81
介于树节点的展开与收缩是经常多处使用的,这里就写个两个调用方法。 /// <summary> /// 展开指定节点以及其父节点 /// </summary> /// <param name="tree">树</param> /// <param name="appointNode">要展开的节点</ ...
分类:
其他好文 时间:
2019-10-27 21:07:20
阅读次数:
107
题目描述 In the mathematical discipline of graph theory, the line graph of a simple undirected weighted graph G is another simple undirected weighted grap ...
分类:
其他好文 时间:
2019-10-27 20:50:31
阅读次数:
119
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nodes ...
分类:
其他好文 时间:
2019-10-27 20:29:12
阅读次数:
75
An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any ...
分类:
其他好文 时间:
2019-10-27 20:26:49
阅读次数:
87
#pragma GCC optimize(3) #pragma GCC target("avx") #pragma GCC optimize("Ofast") #pragma GCC optimize("inline") #pragma GCC optimize("-fgcse") #pragma ...
分类:
其他好文 时间:
2019-10-27 19:10:59
阅读次数:
95
链接:https://codeforces.com/problemset/problem/1244/D 题意:给一个树染上三种颜色,保证每一段长度为3的链颜色都不相同。 题解:颜色很少可以发现,当且仅当这个树是一条链的时候才满足条件(记录度数即可), 对这条链进行暴力染色即可,确定前三个即可确定整条 ...
分类:
其他好文 时间:
2019-10-27 18:52:08
阅读次数:
89