300. Longest Increasing Subsequence(最长上升子序列) 链接 https://leetcode cn.com/problems/merge two binary trees 题目 给定一个无序的整数数组,找到其中最长上升子序列的长度。 示例: 输入: [10,9,2 ...
分类:
其他好文 时间:
2020-03-14 10:48:26
阅读次数:
54
给定一个二叉树,返回它的 后序 遍历。 示例: 输入: [1,null,2,3] 1 \ 2 / 3 输出: [3,2,1] /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *lef ...
分类:
其他好文 时间:
2020-03-14 00:39:36
阅读次数:
75
UTF-8 中的一个字符可能的长度为 1 到 4 字节,遵循以下的规则: 对于 1 字节的字符,字节的第一位设为0,后面7位为这个符号的unicode码。对于 n 字节的字符 (n > 1),第一个字节的前 n 位都设为1,第 n+1 位设为0,后面字节的前两位一律设为10。剩下的没有提及的二进制位 ...
分类:
其他好文 时间:
2020-03-13 20:48:51
阅读次数:
88
226. Invert Binary Tree(翻转二叉树) 链接 https://leetcode cn.com/problems/invert binary tree 题目 翻转一棵二叉树。 示例: 输入: 4 / \ 2 7 / \ / \ 1 3 6 9 输出: 4 / \ 7 2 / \ ...
分类:
其他好文 时间:
2020-03-13 20:30:09
阅读次数:
43
给定一个二叉树,返回它的中序 遍历。 示例: 输入: [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