问题: 给定一棵二叉树。 求给定节点target开始,距离K的所有节点。 Example 1: Input: root = [3,5,1,6,2,0,8,null,null,7,4], target = 5, K = 2 Output: [7,4,1] Explanation: The nodes ...
分类:
其他好文 时间:
2021-03-09 13:09:46
阅读次数:
0
MySQL Logs: 查询日志:query log 慢查询日志:slow query log 错误日志: error log 二进制日志:binary log; 中继日志:reley log 事务日志:transaction log 1、查询日志 记录查询操作; 查询日志可以记录在: 文件:fil ...
分类:
其他好文 时间:
2021-03-03 12:04:58
阅读次数:
0
package com.dai.tree.threadedbinarytree; public class ThreadedBinaryTreeDemo { public static void main(String[] args) { //测试中序线索二叉树功能是否正确 HeroNode roo ...
分类:
其他好文 时间:
2021-02-27 13:26:03
阅读次数:
0
curl \ -H 'Accept-Encoding:gzip' \ -X POST \ --data-binary @/var/req_raw_eeeeeeeeeeeeeeee.eeeeeeee \ "https://aaa.bb.com/api/ccc/dddd?app=aaaaaaa&uuid ...
分类:
Web程序 时间:
2021-02-27 13:06:40
阅读次数:
0
问题: 给定二叉树,进行层序遍历,从底层向上输出。 Example 1: Input: root = [3,9,20,null,null,15,7] Output: [[15,7],[9,20],[3]] Example 2: Input: root = [1] Output: [[1]] Exam ...
分类:
其他好文 时间:
2021-02-26 12:54:45
阅读次数:
0
hive的数据类型分为基本数据类型,数字类型,字符串类型 基本数据类型包括 TINYINT, SMALLINT, INT/INTEGER, BIGINT, FLOAT, DOUBLE, DECIMAL, BOOLEAN, BINARY hive的数字类型 分为整数类型,浮点数类型 hive的字符串类 ...
分类:
其他好文 时间:
2021-02-22 11:50:45
阅读次数:
0
Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n. Examp ...
分类:
其他好文 时间:
2021-02-20 12:13:36
阅读次数:
0
思路分析 和分行从上到下打印二叉树本质上是一样的,只不过奇数行是从左到右打印,偶数行是从右到左打印. cpp /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * Tre ...
分类:
其他好文 时间:
2021-02-19 13:33:14
阅读次数:
0
仅供自己学习 思路: 前面做过102,题目几乎相同,只是输出的方式不同,下意识BFS就选择了队列,但是发现不能解决,因为是单向取单向入得结构,不能从满足一左一右的输出形式。上课的时候了解到一个双端队列,刚好可以满足,只需要一个标记此时是左输出还是右输出即可。当时只想用一个双端队列即可,但是发现写着还 ...
分类:
其他好文 时间:
2021-02-18 13:57:19
阅读次数:
0
struct BinaryTreeNode { int m_nValue; BinaryTreeNode* m_pLeft; BinaryTreeNode* m_pRight; }; bool HasSubTree(BinaryTreeNode* pRoot1, BinaryTreeNode* pR ...
分类:
其他好文 时间:
2021-02-18 13:43:33
阅读次数:
0