从前序与中序遍历序列构造二叉树。题意是给一个二叉树的前序遍历和中序遍历,请根据这两个遍历,把树构造出来。例子, 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
                             
                         
                    
                        
                            
                            
                                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
                             
                         
                    
                        
                            
                            
                                目录 1、Electron背景介绍 2、Windows开发环境配置 3、打造第一个Electron应用 4、安装Electron 5、开发一个简易的Electron 6、了解electron-vue 7、安装vue-cli 8、生成样板代码 9、安装yarn 10、运行程序 11、了解node-gy ...
                            
                            
                                分类:
其他好文   时间:
2020-04-19 00:32:18   
                                阅读次数:
96
                             
                         
                    
                        
                            
                            
                                    Problem : Given a positive integer, check whether it has alternating bits: namely, if two adjacent bits will always have different values. Example 1:  ...
                            
                            
                                分类:
其他好文   时间:
2020-04-18 22:43:40   
                                阅读次数:
74