题解:递归求左右子树的最大深度。 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { ...
分类:
其他好文 时间:
2020-11-06 01:10:43
阅读次数:
21
[default] callback_whitelist = profile_tasks # The best way I’ve found to time the execution of Ansible playbooks is by enabling the profile_tasks cal ...
分类:
其他好文 时间:
2020-11-04 19:01:00
阅读次数:
20
###符号说明 $y_{0}=\left ( a_{1},a_{2},...,a_ \right ) 即y_{0}是a_{1},a_{2},...,a_$的最大公因数 \(d|a_{i}(d整除a_{i},a_{i}是d的倍数)\) ###定理 \(设a_{i}\in Z ,A=\left \{ y ...
分类:
其他好文 时间:
2020-11-04 17:50:48
阅读次数:
12
class Solution { public: int peakIndexInMountainArray(vector<int>& arr) { int n = arr.size(); if(n==0) { return -1; } int left = 0; int right = n-1; w ...
分类:
编程语言 时间:
2020-11-04 17:43:48
阅读次数:
26
1.如何在elementUI的input后面添加单位符号 <i slot="suffix" style="font-style:normal;margin-right: 10px;">℃</i> 2.如何在echarts柱状图上显示数值 在需要显示数值的series里添加: label: { sho ...
分类:
其他好文 时间:
2020-10-30 11:44:30
阅读次数:
23
##前序遍历+判断 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x ...
分类:
其他好文 时间:
2020-10-30 11:39:04
阅读次数:
14
alignment top_right #是否嵌入桌面 background yes #是否绘制窗口边框 draw_borders no #窗口边框 border_width 10 #cpu_avg_samples 2 #默认颜色 #default_color cornflowerblue #默认字 ...
分类:
其他好文 时间:
2020-10-29 10:29:31
阅读次数:
29
You are given a perfect binary tree where all leaves are on the same level, and every parent has two children. The binary tree has the following defin ...
分类:
其他好文 时间:
2020-10-27 11:41:41
阅读次数:
23
二叉树的后续遍历(Leetcode 145) 数据结构定义: // Definition for a binary tree node. public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode() {} Tre ...
分类:
其他好文 时间:
2020-10-24 10:25:33
阅读次数:
22
在Qt的使用过程中不免要与QRect和QRectF打交道。 但是,QRect在数据存储表示上有一个很大的“历史遗留问题”! 引申自QtAssistent对QRect的一段话: 注意,由于历史原因,bottom()和right()函数返回的值偏离了矩形的真正的右下角:right()函数返回left() ...
分类:
其他好文 时间:
2020-10-21 21:07:57
阅读次数:
29