定义
注意
补充、解释
其他
本章全程高能(
1 Applications of Recurrence Relations
“这种题找递推关系是最难的一步”
We distinguish them by the initial conditions, the values of a0 , a1 , a2 , … to uniquely identify a sequence.例如$C...
定义
注意
补充、解释
其他
1 DefinitionDefinition图(Graph)由顶点集合V和边集合E构成,其中顶点集不能为空,每条边一定要有两个端点想象一个三角形ABC,这个图的顶点集合就是{A,B,C}边集合就是{AB,AC,BC}
Undirected Graph: 边AB代表着A可以到B,B也可以到ADirected Graph: 边A->B和边B->A是两条...
对不起,先鸽了,因为明天要考试了呜呜,要靠前辈的笔记先复习了A combinational circuit consists of logic gates whoseoutput is a function of only the present input.
Sequential logic is a type of logic circuit whose outputdepends no...
定义
注意
补充、解释
其他
1 The Basic of Counting1.1 Basic Counting PrinciplesThe Sum RuleIf a first task can be done in $n_1$ ways and a second task in $n_2$ ways, and if these tasks cannot be done at the sa...
定义
注意
补充、解释
其他
1 MotivationGiven an array A[1000000], and we need to frequently calculate the sum of the numbers in an arbitrary range [L, R].如果每次都从L算到R,区间有$N$个数,时间复杂度都是$O(N)$,如果计算频繁,就比较慢
利用线段树,我们...
定义
注意
补充、解释
其他
1 Intro并查集(Union-Find)是一种树型的数据结构,用于处理一些不相交集合的合并及查询问题。它常用于判断两个元素是否属于同一个集合,并在需要时将两个集合合并。并查集在处理动态连通性问题时非常有效。
2 The Dynamic Equivalence ProblemExampleGiven S = { 1, 2, 3, 4, 5, 6, ...
定义
注意
补充、解释
其他
1 Heap (Priority Queue)优先队列:出队不是先进的出,而是有优先级这里我们讨论的优先级为最大/最小,即出队时最大/最小的元素先出队,那么有用数组/链表实现时,出队就要先查找最小/最大元素如果使用BST,我们将面临一个问题:每次删除最小/最大元素时都只会动最左边/最右边的结点,或插入...
定义
注意
补充、解释
其他
1 Sets1.1 DefinitionDefinitionA set is an unordered collection of objects.
The objects in a set are called the elements of the set.
在这门课中,集合的元素可以重复
Subset$A\subseteq B$ (A is a subse...
使用Windows的同学请先安装WSL或Linux虚拟机
Argument Parsing参数间以空格分隔,第一个参数是命令,例如
1234❯ echo hello worldhello world❯ echo "hello world"hello world
cd: 切换当前目录
1234❯ cd ~❯ cd Fuyukawa/../...
定义
注意
补充、解释
其他
1 PreliminariesDefinitionA tree is a collection of nodes.The collection can be empty;otherwise, a tree consists of
a root
0 or more nonempty subtrees
一棵树有n个结点,除了root,每个结点上面都...