You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a ...
分类:
其他好文 时间:
2020-07-11 10:04:24
阅读次数:
84
当一个问题用递推不好描述时,将目光从整体放到局部,用递归描述对于每个元素我们需要做什么。 问题:text 从 point1 、text2 从 point2 开始的最长公共子序列为 n ,具有递归结构,并存在大量重复子问题。 分治: public final int longestCommonSubs ...
分类:
其他好文 时间:
2020-07-11 10:00:21
阅读次数:
62
You are given a doubly linked list which in addition to the next and previous pointers, it could have a child pointer, which may or may not point to a ...
分类:
其他好文 时间:
2020-07-11 09:24:32
阅读次数:
64
有限循环 for i in range()# i自动加一 # for语句中若有break被执行,则跟着for后面的else语句就不会被正常执行;反之亦然 for i in range(3) : print(i) 结果:0、1、2 for i in range(1,3): print(i) 结果:1、 ...
分类:
编程语言 时间:
2020-07-10 23:55:30
阅读次数:
97
以下内容为学习记录,可以参考 MDN 原文。 环境 vscode 1.46 Microsoft Edge 83 条件判断语句 人类(以及其他的动物)无时无刻不在做决定,这些决定都影响着他们的生活,从小事(“我应该吃一片还是两片饼干”)到重要的大事(“我应该留在我的祖国,在我父亲的农场工作;还是应该去 ...
分类:
编程语言 时间:
2020-07-10 21:15:10
阅读次数:
62
水水水! 1 #include <iostream> 2 using namespace std; 3 4 int main() { 5 int a[10] = { 0 }; 6 for (int i = 0; i < 10; i++)cin >> a[i]; 7 //输出第一个数 8 for (i ...
分类:
其他好文 时间:
2020-07-10 09:25:45
阅读次数:
45
题目链接 点我呀 翻译 给你一个长度为 \(n\) 的数组。 你可以将某个位置上的数字换成 \(mex\) 最多 $2*n$ 次。 让你把这个数组变成不下降的,这个数组中的数字都在 $0..n$ 之间。 \(mex\) 表示没有出现过的最小的整数。 题解 构造题,我们可以把目标改为让最后的数组变成 ...
分类:
其他好文 时间:
2020-07-10 00:20:32
阅读次数:
83
for循环 跳出本次循环continue,继续下次循环 var arr = [1,2,3,4,5,6,7,8] for(var i=0, len = arr.length ; i< len ; i++){ if(i == 2){ continue; } console.log(i); } //0 / ...
分类:
Web程序 时间:
2020-07-09 22:43:32
阅读次数:
97
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</t ...
分类:
Web程序 时间:
2020-07-09 22:07:58
阅读次数:
148