深度优先遍历(Depth First Search): 自顶点起, 往下一个邻近点走,一直走,走不动了,退回一部。这样反复; /*深度优先遍历三种方式*/ let deepTraversal1 = (node, nodeList = []) => { if (node !== null) { nod ...
分类:
其他好文 时间:
2020-02-07 22:23:41
阅读次数:
68
c++,如果本节点为空,返回0,否则返回 这棵树孩子中(找到每个节点的最大值,返回最大值+1即可,1是本节点的深度) /* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() { ...
分类:
其他好文 时间:
2020-02-07 20:43:21
阅读次数:
67
book.xml <?xml version="1.0" encoding="UTF-8" ?> <books> <book2> <name id="1">c primer plus111</name> <author>unknow author</author> <date>unknow date ...
分类:
其他好文 时间:
2020-02-06 18:09:19
阅读次数:
60
第八讲 定语从句 雅思写作高分句型 ? The last thing ? that students ? want to do is ? perhaps to take ? test. ? 学生最不愿意做的事情是... Goals:(七分版) \1. 关系代词三大难点 A. 关系代词 | | 人 | ...
分类:
其他好文 时间:
2020-02-04 23:27:10
阅读次数:
112
流程控制 if判断 多条件判断 上边的例子就是找到所有div标签,多个的时候getElements,记住加s,然后放到了一个数组里,然后通过style操作标签css样式,这就是通过原生DOM对象,操作css样式 文本操作 间接查找选择器 通过上边例子能更清晰看到innerText和innerHTML ...
分类:
Web程序 时间:
2020-01-30 12:36:14
阅读次数:
112
题目链接:https://vjudge.net/problem/CodeForces-913B 题目描述: Consider a rooted tree. A rooted tree has one special vertex called the root. All edges are dire ...
分类:
其他好文 时间:
2020-01-30 11:17:51
阅读次数:
101
跨域:是浏览器为了安全而做出的限制策略 浏览器请求必须遵循同源策略:同域名,同端口,同协议 cors跨域- 服务器端设置,前端直接调用 说明:后台允许前端某个站点进行访问 后台设置 Access-Control-Allow-Credentials: true Access-Control-Allow ...
分类:
其他好文 时间:
2020-01-28 21:10:02
阅读次数:
70
创建节点 document.write(创建任意内容,并写入) document.write("<h1>添加到html中的文本</h1>"); docement.createElement(创建元素) var jd = document.createElement("li"); //创建一个li元素 ...
分类:
Web程序 时间:
2020-01-22 16:19:51
阅读次数:
98
起因 起因有二: 在看winter老师的分享:《一个前端的自我修养》时,有注意到这么一幅图,里面有写childNode和children属性。 昨天有学弟问起我,能否自己定义一个所有元素节点通用的方法,就像数组可以用 Array.prototype.xxx 来添加一个所有数组的方法。于是发现自己对于 ...
分类:
其他好文 时间:
2020-01-21 19:56:04
阅读次数:
92
html: <template v-for="(item,index) in children.formItem"> <el-input :ref="item.meta.system_id" v-model="temp[item.meta.valueKey]" clearable oninput=" ...
分类:
其他好文 时间:
2020-01-19 12:19:43
阅读次数:
172