题目给定一个二叉树 struct Node {int val;Node *left;Node *right;Node *next;}填充它的每个 next 指针,让这个指针指向其下一个右侧节点。如果找不到下一个右侧节点,则将 next 指针设置为 NULL。 初始状态下,所有 next 指针都被设置 ...
分类:
其他好文 时间:
2020-07-15 01:05:15
阅读次数:
55
Unique Paths II (M) 题目 A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either ...
分类:
其他好文 时间:
2020-07-14 09:17:23
阅读次数:
72
1.问题描述 有一个函数$f:R\rightarrow R$ ,现在不知道函数 $f(x)$的具体形式,给定满足函数关系的一组训练样本$\left \{ (x_{1},y_{1}),...,(x_{N},y_{N}) \right \}$,N=300,请使用线性回归模型拟合出函数$y=f(x)$。( ...
分类:
其他好文 时间:
2020-07-13 18:48:49
阅读次数:
102
相邻的border会平分所占的区域,出现一个斜线, .my_triangle{ width: 10px; height: 10px; background-color: blue; border-width: 100px ; border-style: solid; border-left-colo ...
分类:
其他好文 时间:
2020-07-13 18:40:16
阅读次数:
71
添加删除记录(原生) 示例: /*style.css*/ @CHARSET "UTF-8"; #total { width: 450px; margin-left: auto; margin-right: auto; } ul { list-style-type: none; } li { bord ...
分类:
Web程序 时间:
2020-07-13 15:39:11
阅读次数:
71
脑筋急转弯 每只蚂蚁都一样,相遇之后,相当于两人互换身份,继续朝原来的方向前进。因此,找出距离朝向端点最远的蚂蚁需要走多久,就是答案。 class Solution { public int getLastMoment(int n, int[] left, int[] right) { int re ...
分类:
其他好文 时间:
2020-07-13 13:24:49
阅读次数:
54
饼图标签展示数值 配置项: option = { title: { text: '项目时间分布', left: 'center' }, tooltip: { trigger: 'item', formatter: '{a} <br/>{b} : {c} ({d}%)' }, legend: { or ...
分类:
其他好文 时间:
2020-07-13 11:34:37
阅读次数:
290
BFS和DFS DFS遍历使用递归(隐式使用栈): void dfs(TreeNode root) { if (root == null) { return; } dfs(root.left); dfs(root.right); } BFS遍历使用队列 void bfs(TreeNode root) ...
分类:
其他好文 时间:
2020-07-12 22:04:02
阅读次数:
66
圣杯布局 1.结构先加载主体,再加载左右 2.将三者都 float:left , 左右再加上一个position:relative(因为相对定位后面会用到)?3、middle 部分 width:100% 占满 ? 此时 middle 占满了,所以要把 left 拉到最左边,使用 marginlef ...
分类:
其他好文 时间:
2020-07-12 18:57:22
阅读次数:
74
1.大纲 内连接:inner join 外连接 (1)左外连接(左边的表不加限制):left join (2)右外连接(右边的表不加限制):right join (3)全外连接(左右表都不加限制):full join(MySQL不支持) (4)只有左表数据 (5)只有右表数据 自连接(同一张表内的连 ...
分类:
其他好文 时间:
2020-07-12 12:10:37
阅读次数:
73