红黑树 相关概念 1 rb_tree 是一种高度平衡的搜索二叉树,其元素排列的规则有利于 search 和 insert,并同时保持适度的平衡。 2 rb_tree 提供遍历操作以及 iterator。元素放入后有一定的排列规则,按正常规则(++ iter)迭代器遍历时为输出为排序状态(sorted ...
分类:
其他好文 时间:
2021-03-16 13:19:30
阅读次数:
0
#111. 二叉树的最小深度 https://leetcode-cn.com/problems/minimum-depth-of-binary-tree/ 关键在于知道f(root)=min(f(left),f(right))+1这个表达式 class Solution { public: int ...
分类:
其他好文 时间:
2021-03-16 12:04:09
阅读次数:
0
void flatten(TreeNode root) { // base case,即最小 if (root == null) return; flatten(root.left); flatten(root.right); /**** 后序遍历 ****/ // 1、保存原来的左右节点,避免变换 ...
分类:
其他好文 时间:
2021-03-16 11:50:33
阅读次数:
0
Codeforces 1495F 搞了一上午的心得 不愧是div1的压轴题,真jr爽 这可比whk得劲多了! 约定 我们令题目中的 \(a_0=b_0=0\)。 \(i\) 的前驱:\(max(j:j<i,p_j>p_i)\) \(i\) 的后继:\(min(j:j>i,p_j>p_i)\) 如果 ...
分类:
其他好文 时间:
2021-03-16 11:49:46
阅读次数:
0
Binary Trees With Factors (M) 题目 Given an array of unique integers, arr, where each integer arr[i] is strictly greater than 1. We make a binary tree u ...
分类:
其他好文 时间:
2021-03-15 11:24:45
阅读次数:
0
2021年贵港市中考录取分数线,将于7月中下旬公布!请考生家长注意收藏 进入查看:2021年贵港市中考录取分数线 A.Eat more healthful foods. B.Choose different foods in season. C.Don't be so busy that you g ...
分类:
其他好文 时间:
2021-03-15 11:15:46
阅读次数:
0
Description: Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from left to right, level by lev ...
分类:
其他好文 时间:
2021-03-15 11:13:18
阅读次数:
0
<div class="el-tree-box"> <div class="demo-box"> <el-tree class="my-scrool-com" :data="treeList" :props="defaultProps" :expand-on-click-node="false" > ...
分类:
其他好文 时间:
2021-03-15 11:01:38
阅读次数:
0
Mysql存储引擎MyISAM与InnoDB - B+树数据的增删细节 Mysql存储引擎MyISAM与InnoDB - B+树数据的增删细节 前言Mysql索引文件的存储结构 1. InnoDB - B+Tree,叶子节点直接放置数据1.2 回表 2. MyISAM--B+Tree,叶子节点放置数 ...
分类:
数据库 时间:
2021-03-15 10:53:32
阅读次数:
0
C - UFO 题意 给一个 \(n\times m\) 的矩形,代表对应位置方块的数目,现在进行 \(k\) 次激光攻击,每次激光攻击会在高度 \(h\) 处从 \(N,S,W,E\) 四个方向中的一个向对面发射激光,若命中一个块,则改方块消失,每次激光最多消灭 \(r\) 个方块。 攻击结束后, ...
分类:
其他好文 时间:
2021-03-12 12:40:39
阅读次数:
0