PS:本文主要包括二叉树的前序,中序,后序,层序,垂序遍历,使用cpp语言。 前序遍历 struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(NULL), right(NU ...
分类:
其他好文 时间:
2021-04-20 15:06:15
阅读次数:
0
You are given 2 arrays a and b, both of size n. You can swap two elements in b at most once (or leave it as it is), and you are required to minimize t ...
分类:
移动开发 时间:
2021-04-20 15:01:50
阅读次数:
0
题目链接 A. Average Height 奇数放一侧,偶数放一侧即可。 AC代码如下: #include<cstring> #include<algorithm> #include<cmath> #include<iostream> #include<queue> #include<cstdio ...
分类:
其他好文 时间:
2021-04-19 15:52:38
阅读次数:
0
题目大意: 给你一个序列,一些查询 每次查询区间[L,R]中出现次数大于T的最小的a[i]是多少 题目思路: 一眼主席树 但是这个题目在于如何用好这个条件 2?≤?k?≤?5 假设这个序列长度是1000,k=5 那么就是找出现次数大于200的,但是这样的数字最多有多少个呢? 很明显 不会超过k个 然 ...
分类:
其他好文 时间:
2021-04-19 15:08:27
阅读次数:
0
// 上传首页数据设置、主题js文件export function uplaodTheme(data, fileName) { var dataString = JSON.stringify(data); var blob = new Blob([dataString], {type: "text/ ...
分类:
Web程序 时间:
2021-04-16 11:57:04
阅读次数:
0
效果 代码 1 <Window x:Class="WpfApp12.MainWindow" 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x="http://schemas.microsoft. ...
You have a card deck of n cards, numbered from top to bottom, i. e. the top card has index 1and bottom card — index n. Each card has its color: the 𝑖 ...
分类:
其他好文 时间:
2021-04-15 12:03:00
阅读次数:
0
一. RabbitMq简介 二. 安装步骤 参考: https://www.cnblogs.com/yaopengfei/p/13763500.html (需要补充一下) ! 作 者 : Yaopengfei(姚鹏飞) 博客地址 : http://www.cnblogs.com/yaopengfei ...
分类:
其他好文 时间:
2021-04-14 11:49:16
阅读次数:
0
http://codeforces.com/contest/1513/problem/C dp $f[i][j]:$表示当前数位上为i(0~9), 加法次数为j最终形成的数位. f[i][j] = f[i - 1][j + 1]; f[9][j] = f[1][j + 1] + f[0][j + 1 ...
分类:
其他好文 时间:
2021-04-13 12:19:52
阅读次数:
0
1.定位position的取值: static:默认值,静态的 relative:相对定位 absolute:绝对定位 fixed:固定定位 sticky:粘性定位 既然是定位了,不同定位之间的区别是参考系不同 position:static 特点:默认的定位方式,元素不受top,buttom,le ...
分类:
Web程序 时间:
2021-04-13 11:40:23
阅读次数:
0