例子 1 border-radius:2em; 等价于: border-top-left-radius:2em; border-top-right-radius:2em; border-bottom-right-radius:2em; border-bottom-left-radius:2em; 例 ...
分类:
其他好文 时间:
2020-07-18 22:30:05
阅读次数:
94
中序。 刚拿到题目时,第一想法是递归,但是搞错了二叉搜索树成立的条件。 我以为的条件是:左侧树为二叉搜索树,右侧树为二叉搜索树,且root.right>root>root.left,然后递归。 但是显然这不对,满足以上条件后,root.right.left可能比root要小。 先说正确的递归解法:正 ...
分类:
其他好文 时间:
2020-07-18 22:03:27
阅读次数:
71
题目链接:https://leetcode-cn.com/problems/flip-equivalent-binary-trees/ 解题思路:进行递归,当root1和root2都为空时,返回true,如果双方一个不为空,另一个为空为或双方根节点值不相等false,否则对左右子树分别不翻转判断或翻 ...
分类:
其他好文 时间:
2020-07-18 21:54:16
阅读次数:
70
题解:层次遍历的基础上加个计数器,偶数层得到的结果反转一下 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeN ...
分类:
其他好文 时间:
2020-07-18 21:52:24
阅读次数:
59
Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specificat ...
分类:
其他好文 时间:
2020-07-18 21:49:07
阅读次数:
59
解题:利用队列先进先出来实现层次遍历 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) ...
分类:
其他好文 时间:
2020-07-18 19:52:44
阅读次数:
68
MySQL源码关于链表的实现在ut0lst.h文件中,其设计思路与常规略有不同,基本思想是指针嵌于对象之内,如下图所示。 在这种实现方式下,构造一个链表需要同时指定对象类型和对象内指针节点的地址。为什么这么复杂呢?我们对比一下C++11标准库中list的实现,发现其就是一个模板类,构造一个list只 ...
分类:
数据库 时间:
2020-07-18 19:51:54
阅读次数:
75
<head> <style> .adModal{ position:fixed; background: black; top: 0; right: 0; bottom: 0; left: 0; z-index: 998; opacity: 0.4; } .tdModal{ position:fix ...
分类:
其他好文 时间:
2020-07-18 19:50:38
阅读次数:
67
内边距:padding padding-top: padding-right: padding-bottom: padding-left: 简写方式: padding:上 右 下 左 ; padding:10px 10px;(上下,左右) 注意:padding会撑大盒子宽度 ...
分类:
其他好文 时间:
2020-07-18 16:00:39
阅读次数:
58
外边距:margin margin-top: margin-right: margin-bottom: margin-left: 简写方式: margin:30px;(上下左右都30px) margin:30px 50px;(上下,左右) margin:上 右 下 左; ...
分类:
其他好文 时间:
2020-07-18 15:57:14
阅读次数:
58