二叉树
深度104. 二叉树的最大深度https://leetcode.cn/problems/maximum-depth-of-binary-tree/求深度用前序遍历
123456class Solution { public int maxDepth(TreeNode root) { if(root == null) return 0; return Math.max(maxDepth(root.left), maxDepth(root.right)) + 1; }}
111.二叉树的最小深度https://leetcode.cn/problems/minimum-depth-of-binary-tree/description/求高度用后序遍历
1234567891011121314class Solution { public int minDepth(TreeNode root) { if(root == null) return 0; int ...
服务器更改ssh端口号
修改/etc/ssh/sshd_config文件
12345#进入ssh目录中cd /etc/ssh#打开sshd_config文件vi sshd_config#更改Port为指定端口号 保存返回
修改firewall配置
1firewall-cmd --zone=public --add-port=1833/tcp --permanent #会返回success
重载防火墙
1firewall-cmd --reload
重启ssh服务
1systemctl restart sshd.service
在阿里云上添加安全组
结束
Hello Huiex
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment