Github项目地址:https://github.com/bravedreamer/test/tree/master/Arithmetic 在线预览:https://bravedreamer.github.io/test/Arithmetic/index.html 项目合作者:吴尚谦 311800 ...
分类:
其他好文 时间:
2020-04-14 00:45:22
阅读次数:
65
时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32M,其他语言64M 题目描述 请实现两个函数,分别用来序列化和反序列化二叉树 二叉树的序列化是指:把一棵二叉树按照某种遍历方式的结果以某种格式保存为字符串,从而使得内存中建立起来的二叉树可以持久保存。序列化可以基于先序、中序、后序、 ...
分类:
其他好文 时间:
2020-04-13 22:52:00
阅读次数:
84
梯度提升树(GBDT)的全称是Gradient Boosting Decision Tree。GBDT还有很多的简称,例如GBT(Gradient Boosting Tree), GTB(Gradient Tree Boosting ),GBRT(Gradient Boosting Regressi ...
分类:
编程语言 时间:
2020-04-13 00:29:22
阅读次数:
47
1)ls 查看当前文件夹下的内容 2)pwd 查看当前路径 3)clear 清屏 4)mkdir 创建文件夹 5)touch 创建文件 6)rm 删除文件 rm -r 删除文件夹 7)cp 拷贝 8)mv 移动、重命名 9)> 重定向 10)more 分屏显示 11) | 管道一个命令的输出可以通过 ...
分类:
编程语言 时间:
2020-04-12 22:27:02
阅读次数:
88
二、二叉树 在进一步讨论树之前,先讨论一种简单而重要的树结构——二叉树。因为 任何树都可以转化为二叉树进行处理,二叉树作为特殊的树,适合于计算机处理 ,所以二叉树是研究的重点。 1. 二叉树的基本操作 1. 定义: 定义:把满足以下两个条件的树型结构叫做二叉树( Binary Tree): ? (1 ...
分类:
其他好文 时间:
2020-04-12 22:24:39
阅读次数:
100
Programmer Rostislav got seriously interested in the Link/Cut Tree data structure, which is based on Splay trees. Specifically, he is now studying the ...
分类:
其他好文 时间:
2020-04-12 20:18:43
阅读次数:
92
地址:https://leetcode cn.com/problems/binary tree preorder traversal/submissions/ 大意:前序遍历一棵树 ` ` ...
分类:
其他好文 时间:
2020-04-12 18:34:41
阅读次数:
64
1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x), ...
分类:
其他好文 时间:
2020-04-12 18:30:30
阅读次数:
65
104.求二叉树的最大深度 class Solution: def maxDepth(self, root: TreeNode) -> int: if root == None: return 0 else: leftdepth = self.maxDepth(root.left) rightdep ...
分类:
其他好文 时间:
2020-04-12 10:47:43
阅读次数:
73
要求 给定一棵二叉树,返回所有表示从根节点到叶子节点路径的字符串 思路 递归地返回左右子树到叶子节点的字符串 示例 1 class Solution { 2 public: 3 vector<string> binaryTreePaths(TreeNode* root) { 4 5 vector<s ...
分类:
其他好文 时间:
2020-04-12 10:44:25
阅读次数:
60