思路,将一个数组不断拆分,拆到一个元素之后,倒过来一步步排好序,获得新的数组 [55,23,66,905,56,85,356,30,57,34,832,230] left=[55,23,66,905,56,85] right=[356,30,57,34,832,230] left可以看成一个新数组, ...
分类:
编程语言 时间:
2020-05-18 18:18:53
阅读次数:
64
圆角矩形可以用为4个角分别设置圆度,但是有顺序的border-top-left-radius:20px;border-top-right-radius:20px;border-bottom-left-radius:20px;border-bottom-right-radius:20px; 简写方法 ...
分类:
Web程序 时间:
2020-05-18 14:25:22
阅读次数:
69
1 //结构体定义如下 2 struct TreeNode 3 { 4 char val; 5 TreeNode* left; 6 TreeNode* right; 7 TreeNode(char x) : val(x), left(NULL), right(NULL) {} 8 }; 1. 前序遍 ...
分类:
其他好文 时间:
2020-05-17 19:13:57
阅读次数:
64
快速排序 时间复杂度:O(nlogn) def partition(li, left, right): tmp = li[left] while left < right: while left < right and li[right] >= tmp: # 从右边找比tmp小的数 right -= ...
分类:
编程语言 时间:
2020-05-17 17:45:40
阅读次数:
64
题目描述: 提交: class Solution: def goodNodes(self, root: TreeNode) -> int: def helper(m,node): r,left,right = 0,0,0 if node.val >= m: r = 1 if node.left: l ...
分类:
其他好文 时间:
2020-05-17 13:37:14
阅读次数:
65
```go package main import "log" type node struct { Item string Left *node Right *node } type bst struct { root *node } /* m k l h i j a b c d e f //先序... ...
分类:
其他好文 时间:
2020-05-16 23:34:25
阅读次数:
132
八.文本格式化 2.文本属性 ①文本颜色 color:合法的颜色值 ②文本对齐方式 text-align: 取值 left/center/right/justify 注意 1.一个元素写了text-align,控制的是内部的文本 2.这个元素自己想居中对齐,margin:0 auto; 3.text ...
分类:
Web程序 时间:
2020-05-16 18:49:01
阅读次数:
129
SPAN标签: <SPAN title=用户信息 class="tabSpan" id=shop_tabsTAB_content4 style="BORDER-LEFT-WIDTH: 1px; HEIGHT: 23px; BORDER-RIGHT-WIDTH: 1px; BORDER-BOTTOM- ...
分类:
Web程序 时间:
2020-05-15 13:44:35
阅读次数:
89
1、 同级样式中,不同类名公用相同或不同样式简洁写法: & 符号作用,在嵌套层次中回溯一层,既实现效果: .icon-zfgs .icon-zfjd ...... 2、:last-child作用:指定父元素中最后一个元素的样式,效果如图: 既简洁修改最后一个div的margin-right。 ...
分类:
Web程序 时间:
2020-05-14 17:13:39
阅读次数:
211
题意: "codeforces链接" 给定长度为 $n$ 的数字串 $s$ 和长度为 $d$ 的不含前导零的数字串 $x,y(x \le y)$。 求 存在长度至少为 $\left\lfloor\frac{d}{2}\right\rfloor$ 的子串是 $s$ 的子串 的数字串 $t \in [x ...
分类:
其他好文 时间:
2020-05-14 12:46:24
阅读次数:
58