96. 不同的二叉搜索树 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/unique-binary-search-trees 题目 给定一个整数 n,求以 1 ... n 为节点组成的二叉搜索树有多少种? 示例: 输入: 3 输出: 5 解释: ...
分类:
编程语言 时间:
2020-07-15 23:11:39
阅读次数:
74
二分图最大匹配: 匈牙利算法 邻接表O(mn): #pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; const int maxn = 1010; const int maxm = 2e5; int n, m, ...
分类:
其他好文 时间:
2020-07-14 21:42:51
阅读次数:
67
1、安装依赖包,使用yum工具安装 yum -y install gcc make zlib-devel pcre pcre-devel openssl-devel 2、安装命令 sudo yum install nginx 3、安装完成后,使用以下命令启用并启动Nginx服务 $ sudo sys ...
分类:
其他好文 时间:
2020-07-14 16:48:16
阅读次数:
164
第一周老板布置的第二个小任务是了解一下python里怎么调用C语言写的函数,应该是之后为了改进效率。 然后我研究了一下,发现一些写的比较好的文章 https://www.cnblogs.com/lzc978/p/10101655.html 我没接触过gcc命令,所以啥也不知道……然后我就看见了这篇文 ...
分类:
编程语言 时间:
2020-07-14 13:11:03
阅读次数:
58
(熟练!重要!)二叉搜索树 BST ##题目大意 判断给定序列是否是一个BST或镜像BST树的先序遍历序列,如果是则输出该树的后序遍历序列。 ##思路 根据给定序列创建BST树,求出它的先序遍历和镜像树的先序遍历(即原树遍历时按照根->右->左),与原序列比较。 ##AC代码 #define _CR ...
分类:
其他好文 时间:
2020-07-14 11:52:38
阅读次数:
62
centos8安装redis6.0.5 安装redis需要gcc,所以,需要先安装gcc yum install gcc 2. 新建个目录,下载redis并解压缩: mkdir /usr/local/redis cd /usr/local/redis wget http://download.red ...
分类:
其他好文 时间:
2020-07-13 21:44:32
阅读次数:
104
题目链接 https://leetcode-cn.com/problems/binary-tree-inorder-traversal/ 题解一:递归 // Problem: LeetCode 94 // URL: https://leetcode-cn.com/problems/binary-tr ...
分类:
其他好文 时间:
2020-07-13 15:36:49
阅读次数:
58
一、MySQL5.6与MySQL5.7的区别 1.编译安装区别 # 总结: 如果选择使用源码安装5.7,则需要多装一个boostorg,在官网可以下载 #5.7在编译安装的时候多了一个boostorg库 [root@db02 mysql-5.7.20]# yum install -y gcc gcc ...
分类:
数据库 时间:
2020-07-13 15:16:12
阅读次数:
169
水平有限,本文仅以流水账的方式 介绍自己 安装 三款软件 的过程。 环境Ubuntu on 虚拟机: $ cat /proc/version Linux version 4.15.0-54-generic (buildd@lgw01-amd64-014) (gcc version 7.4.0 \(U ...
分类:
其他好文 时间:
2020-07-13 13:14:44
阅读次数:
63
Given a binary string s (a string consisting only of '0' and '1's). Return the number of substrings with all characters 1's. Since the answer may be t ...
分类:
其他好文 时间:
2020-07-13 09:56:37
阅读次数:
68