Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet ...
分类:
其他好文 时间:
2020-04-22 09:28:17
阅读次数:
63
从前序与中序遍历序列构造二叉树。题意是给一个二叉树的前序遍历和中序遍历,请根据这两个遍历,把树构造出来。例子, For example, given preorder = [3,9,20,15,7] inorder = [9,3,15,20,7] Return the following binar ...
分类:
其他好文 时间:
2020-04-21 13:31:31
阅读次数:
65
Linux系统文件结构 /bin: bin是Binary的缩写, 这个目录存放着最经常使用的命令。 /boot: 这里存放的是启动Linux时使用的一些核心文件,包括一些连接文件以及镜像文件。 /dev : dev是Device(设备)的缩写, 该目录下存放的是Linux的外部设备,在Linux中访 ...
分类:
系统相关 时间:
2020-04-21 13:11:19
阅读次数:
79
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 ...
分类:
其他好文 时间:
2020-04-21 09:51:36
阅读次数:
66
先序遍历构造二叉搜索树。题目即是题意,例子, Input: [8,5,1,7,10,12] Output: [8,5,10,1,7,null,12] 这个题可以迭代或递归都可以做,我这里暂时先给出递归的做法。因为是BST所以会简单很多,首先input的首个元素是树的根节点,接着写一个helper函数 ...
分类:
其他好文 时间:
2020-04-21 09:34:03
阅读次数:
63
树 104.二叉树的最大深度 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { va ...
分类:
其他好文 时间:
2020-04-21 00:21:22
阅读次数:
87
AWS 监控与报警 aws CloudWatch 自动恢复硬件故障实例 Auto Recover 20180702 Chenxin 常用项目 创建EC2后: 需要添加的报警 主机状态检查(主机存活) CPU利用率 内存使用率(含buffer,cache) 磁盘使用率 并修改"正常,警报,不足(缺失) ...
分类:
其他好文 时间:
2020-04-20 17:35:07
阅读次数:
92
hyperbase官方简介: Transwarp Hyperbase实时数据库是建立在Apache HBase和Elasticsearch基础之上,融合了多种索引技术、分布式事务处理、全文实时搜索、图形数据库在内的实时NoSQL数据库。 个人总结: hyperbase是基于开源hbase+hive的 ...
分类:
其他好文 时间:
2020-04-20 16:12:19
阅读次数:
280
Problem : Given two integers L and R, find the count of numbers in the range [L, R] (inclusive) having a prime number of set bits in their binary repr ...
分类:
其他好文 时间:
2020-04-20 11:50:44
阅读次数:
65
二叉树的最小深度 LeetCode: "二叉树的最小深度" 题目描述: 给定一个二叉树,找出其最小深度。 最小深度是从根节点到最近叶子节点的最短路径上的节点数量。 说明: 叶子节点是指没有子节点的节点 示例: 思想: 还是递归,没啥特别的 代码 我的第一遍代码: 优化之后: if(x == 0||y ...
分类:
编程语言 时间:
2020-04-19 11:17:51
阅读次数:
76