DECLARE @table TABLE( id INT NOT NULL ,cityName NVARCHAR(100) ,parentId int NOT null)INSERT INTO @table( id, cityName, parentId)SELECT 1,'湖南省',0 UNION ...
分类:
数据库 时间:
2020-05-13 13:53:53
阅读次数:
105
1、创造一个节点 数据是以节点的形式存储的: 1 2 3 4 5 6 7 class Node { constructor(data) { this.data = data; this.parent = null; this.children = []; } } 2、创造树 树用来连接节点,就像真实 ...
分类:
编程语言 时间:
2020-05-13 12:01:48
阅读次数:
67
Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the sam ...
分类:
其他好文 时间:
2020-05-13 09:40:41
阅读次数:
65
不废话,直接上代码~ 1 package 集合与映射表; 2 3 import java.util.TreeSet; 4 import javafx.application.Application; 5 import javafx.geometry.Pos; 6 import javafx.scen ...
分类:
编程语言 时间:
2020-05-13 00:33:04
阅读次数:
78
今天看数据库,书中提到:由于索引是采用 B 树结构存储的,所以对应的索引项并不会被删除,经过一段时间的增删改操作后,数据库中就会出现大量的存储碎片,这和磁盘碎片、内存碎片产生原理是类似的,这些存储碎片不仅占用了存储空间,而且降低了数据库运行的速度。如果发现索引中存在过多的存储碎片的话就要进行“碎片整 ...
分类:
其他好文 时间:
2020-05-11 23:34:39
阅读次数:
89
Wifi连接 自动获取IP 实现程序如下: Wifi连接 手动获取IP 实现程序如下: 有线连接 自动获取IP 实现程序如下: 有线连接 手动获取IP 实现程序如下: 完整工程的GitHub链接 https://github.com/confidentFeng/VSAppProject/tree/N ...
1.设备树的引入 在没有引入设备树之前,在内核中充斥的很多板卡硬件描述代码。而且很多都是重复的。对于修改以及维护都很麻烦。因此引入了设备树。 2.什么是设备树 Device Tree是一种描述硬件的数据结构,在Linux 2.6中,ARM架构的板极硬件细节过多地被硬编码在arch/arm/plat- ...
分类:
其他好文 时间:
2020-05-11 15:58:35
阅读次数:
84
Codeforces Round 395 div1 "contest链接" tags 、`费马小定理 树hash 换根 线段树 并查集` 码量细节:E C D A B 难度:C E D B A A. Timofey and a tree 题意:给一棵点染色树,求一个根节点,使得除了原树以外所有的子树 ...
分类:
其他好文 时间:
2020-05-11 15:47:23
阅读次数:
52
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the ...
分类:
其他好文 时间:
2020-05-11 12:57:57
阅读次数:
76