给定一个二叉树,返回它的中序 遍历。 示例: 输入: [1,null,2,3] 1 \ 2 / 3 输出: [1,3,2] 递归: /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode * ...
分类:
其他好文 时间:
2020-03-13 19:04:49
阅读次数:
59
04-树5 Root of AVL Tree (25分) An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node dif ...
分类:
其他好文 时间:
2020-03-13 19:01:17
阅读次数:
77
/bin:binary,存放最经常使用的命令 /sbin:(super user),存放系统管理员使用的系统管理程序 /home:存放普通用户的主目录,Linux中每个用户都有自己的一个目录,一般该目录以用户的账号命名 /root:系统管理员,又称超级权限者的用户主目录 /lib:系统开机所需最基本 ...
分类:
系统相关 时间:
2020-03-13 01:13:03
阅读次数:
72
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note:You may assume k is always valid, 1 ≤ k ≤ BST's ...
分类:
其他好文 时间:
2020-03-12 10:13:11
阅读次数:
82
二进制(binary)在数学和数字电路中指以2为基数的记数系统,以2为基数代表系统是二进位制的。这一系统中,通常用两个不同的符号0(代表零)和1(代表一)来表示。数字电子电路中,逻辑门的实现直接应用了二进制,因此现代的计算机和依赖计算机的设备里都用到二进制。每个数字称为一个比特(Bit,Binary ...
分类:
其他好文 时间:
2020-03-12 10:11:42
阅读次数:
106
Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] ...
分类:
其他好文 时间:
2020-03-12 09:53:25
阅读次数:
54
Given a binary tree root, a ZigZag path for a binary tree is defined as follow: Choose any node in the binary tree and a direction (right or left). If ...
分类:
其他好文 时间:
2020-03-12 09:26:04
阅读次数:
76
<> 题目描述 给定一棵二叉树,你需要计算它的直径长度。一棵二叉树的直径长度是任意两个结点路径长度中的最大值。这条路径可能穿过根结点。 示例 : 给定二叉树 1 / \ 2 3 / \ 4 5 返回 3, 它的长度是路径 [4,2,1,3] 或者 [5,2,1,3]。 注意:两结点之间的路径长度是以 ...
分类:
其他好文 时间:
2020-03-11 21:02:14
阅读次数:
65
简写 全称(英文) 中文解释 BIN binary 二进制 OCT octal 八进制 HEX hexadecimal 十六进制 DEC decimal 十进制 ...
分类:
其他好文 时间:
2020-03-11 12:35:40
阅读次数:
69
报错如图: 这个是因为sass安装时获取源的问题,先修改sass安装的源,再运行npm install就成功了 npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass ...
分类:
Web程序 时间:
2020-03-11 11:01:49
阅读次数:
450