CHARINDEX()和PATINDEX() 1 SELECT CHARINDEX('c','aabbccdd') 1 SELECT CHARINDEX('c','aabbccdd',6) 数字是从第几位往后查询,其中这里的字符串貌似是没有‘0’位。 SELECT *,CHARINDEX('单',n ...
分类:
数据库 时间:
2020-07-19 18:06:25
阅读次数:
102
#树上求和 题目链接:https://ac.nowcoder.com/acm/contest/5986/E ###涉及知识点: 二分 思维 ###solution: 二分出答案 假设答案是x的话,判断我们至少删除几个可以到达x 如果我们需要删除的数量大于m的话,那么此时答案一定是比小的(right ...
分类:
其他好文 时间:
2020-07-18 22:42:04
阅读次数:
73
例子 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
题解:层次遍历的基础上加个计数器,偶数层得到的结果反转一下 /** * 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
<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