Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. Example : Input: ...
分类:
其他好文 时间:
2020-01-14 12:56:57
阅读次数:
59
1.导入数据 批量导入数据并查看 1.1 导入数据 1) 使用POST方式批量导入数据,数据格式为json,url 编码使用data-binary导入含有index配置的json文件 ]# scp /var/ftp/elk/*.gz 192.168.1.66:/root/ kibana ~]# gz ...
分类:
其他好文 时间:
2020-01-13 10:54:26
阅读次数:
159
Given a binary tree struct Node { int val; Node *left; Node *right; Node *next; } Populate each next pointer to point to its next right node. If there ...
分类:
其他好文 时间:
2020-01-13 01:07:44
阅读次数:
93
背景 Go程序运行时打印git提交信息编译信息 Golang编译信息注入程序 当在debug的过程中,我们需要明确当前运行的go程序是什么版本 不要浪费时间在确认版本的问题上 在go build编译的时候是可以注入外部参数的 让go程序在运行的时候就可以打印编译时候的参数情况 以gitlab run ...
分类:
其他好文 时间:
2020-01-12 22:15:23
阅读次数:
113
题目如下: Given a binary tree, return the sum of values of nodes with even-valued grandparent. (A grandparent of a node is the parent of its parent, if it ...
分类:
其他好文 时间:
2020-01-12 17:53:44
阅读次数:
56
二叉树的路径和。题意是给一个二叉树和一个数字sum。求是否有这样一条路径可以使得二叉树从根节点到叶子节点经过的所有的节点值之和等于sum。此题可以用BFS和DFS两种做法解决,时间和空间复杂度都是O(n)。例子如下, Example: Given the below binary tree and ...
分类:
其他好文 时间:
2020-01-12 15:04:09
阅读次数:
65
二叉树的路径和二。题意跟版本一很接近,唯一的不同是版本一只是问是否有满足条件的路径;版本二是输出所有满足条件的路径和。例子, Example: Given the below binary tree and sum = 22, 5 / \ 4 8 / / \ 11 13 4 / \ / \ 7 2 ...
分类:
其他好文 时间:
2020-01-12 14:56:50
阅读次数:
47
二叉树路径。题意是给一个二叉树,请输出从根节点遍历到每个最小的叶子节点的路径。例子 Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] Explanation: All root-to-leaf paths are: 1->2->5, ...
分类:
其他好文 时间:
2020-01-12 13:25:09
阅读次数:
71
二叉树层序遍历。题干既是题意。如下例子, For example:Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 20 / \ 15 7 return its level order traversal as: [ [3], [9,20], [1 ...
分类:
其他好文 时间:
2020-01-12 09:41:11
阅读次数:
54
sysctl.conf学习和调优 https://www.jianshu.com/p/9a8e383b5b49 前言 记得第一次接触/etc/security/limits.conf和/etc/sysctl.conf时是因为部署Oracle时要按需修改内核参数。limits.conf文件实际是Lin ...
分类:
其他好文 时间:
2020-01-12 09:23:05
阅读次数:
151