Maximum Width of Binary Tree (M) 题目 Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maxim ...
                            
                            
                                分类:
其他好文   时间:
2020-07-10 10:11:00   
                                阅读次数:
54
                             
                         
                    
                        
                            
                            
                                    Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The binar ...
                            
                            
                                分类:
其他好文   时间:
2020-07-10 10:07:44   
                                阅读次数:
60
                             
                         
                    
                        
                            
                            
                                01JVM内存结构Java虚拟机的内存空间分为5个部分:?程序计数器?Java虚拟机栈?本地方法栈?堆?方法区JDK1.8同JDK1.7比,最大的差别就是:元数据区取代了永久代。元空间的本质和永久代类似,都是对JVM规范中方法区的实现。不过元空间与永久代之间最大的区别在于:元数据空间并不在虚拟机中,而是使用本地内存。1.1程序计数器(PC寄存器)(1)程序计数器的定义程序计数器是一块较小的内存空间
                            
                            
                                分类:
其他好文   时间:
2020-07-10 09:58:56   
                                阅读次数:
77
                             
                         
                    
                        
                            
                            
                                    Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The binar ...
                            
                            
                                分类:
其他好文   时间:
2020-07-10 09:54:38   
                                阅读次数:
54
                             
                         
                    
                        
                            
                            
                                题意:如下是一个三角形ABC.$点D,E和F是三角形ABC的三等分点,$求$三角形PQR$的面积。 分析:三等分点的坐标可以推导出来,比如求D的坐标,D的坐标为$(\frac{2 * B.x + C.x}{3}, \frac{2 * B.y + C.y}{3})$,然后求出$三个交点P, R, Q$ ...
                            
                            
                                分类:
其他好文   时间:
2020-07-09 19:45:35   
                                阅读次数:
186
                             
                         
                    
                        
                            
                            
                                    题目描述: 给定一个非空二叉树,返回其最大路径和。 本题中,路径被定义为一条从树中任意节点出发,达到任意节点的序列。该路径至少包含一个节点,且不一定经过根节点。 示例 1: 输入: [1,2,3] 1 / \ 2 3 输出: 6示例 2: 输入: [-10,9,20,null,null,15,7]  ...
                            
                            
                                分类:
其他好文   时间:
2020-07-09 19:10:05   
                                阅读次数:
51
                             
                         
                    
                        
                            
                            
                                    因为题目已知至少要k-2个 假设我们取了k个,使得答案最大 那么因为对于每个数来说至少k-2个数在这位是1 因此我们只要任意选三个数,都能保证在每一位上都有至少一个数为1 #include<bits/stdc++.h> using namespace std; typedef long long l ...
                            
                            
                                分类:
其他好文   时间:
2020-07-09 15:12:45   
                                阅读次数:
67
                             
                         
                    
                        
                            
                            
                                    关于JVM,也许你听过这些术语:年轻代(新生代)、老年代、永久代、minor gc(young gc)、major gc、full gc 不要急,先上图,这是jvm 堆内存结构图 仔细的你发现了 图中有些分数8/10和1/10,这是默认配置下各个代内存分配比例。 举个栗子: 假如总heap max分 ...
                            
                            
                                分类:
其他好文   时间:
2020-07-09 12:00:19   
                                阅读次数:
197
                             
                         
                    
                        
                            
                            
                                    最大并发200,100的并发递增施压,到达200后持续360秒1:this group will start:表示总共要生成的最大线程数,如图:设置为:200 个,表示总共会加载到 200个线程2:first,wait for:第一个线程从点击执行之后多长时间开始加载,如图:设置为 0 秒,表示点击 ...
                            
                            
                                分类:
编程语言   时间:
2020-07-09 10:47:44   
                                阅读次数:
137
                             
                         
                    
                        
                            
                            
                                    1、官网下载redis-5.0.5.tar.gz压缩包 2、安装gcc和gc-c++ yum install gcc yum install gc-c++ 3、将redis-5.0.5.tar.gz上传到/opt文件夹下 4、运行 tar -zxvf redis-5.0.5.tar.gz 进行解压  ...
                            
                            
                                分类:
系统相关   时间:
2020-07-08 22:49:37   
                                阅读次数:
79