Two fork tree: each node has at most two subtrees.
Full two fork tree: the number of nodes in each layer is the largest node number.
Complete binary tree: Leaf nodes are in the last two layers; for any node, the depth of the left subtree is 1 or equal to the depth of the right subtree
Nature:
Two fork tree: layer I, at most there are 2^ (i-1) nodes.
Two fork tree: the depth of K two fork tree, at most there are (2^k) -1 nodes.
Full two fork tree: the number of nodes in the full two fork tree with a depth of K is (2^k) -1
Binary tree: any binary tree, degree 0 of the number of nodes n0, degree...
First, stack
Stack top (top) stack bottom (bottom)
After the advanced, from the top of the stack insert, remove from the top of the stack.
Sequential stack: Stores elements from the bottom of the stack to the top of the stack at one time with a set of sequential storage units with top stack top pointers attached
Initialization: first allocate a space of the specified size and expand it by space after the space is insufficient.
base The bottom pointer of the stack always points to the bottom of the stack.
top The top pointer of the stack always points to the next position o...
Basic command learning directory
Technical reference summary
pythonCommon module catalog
Common software installation and use directory
Database learning directory
shellLearning directory
1、The essence of Internet is a series of network protocols.
A hard-wired operating system, then loaded with software you can use normally, but you can only use it yourself.
Like this, everyone has a machine of their own, but they are isolated from each other.
English has become the universal standard of communication for all people in the world. If you look at computers as people all over the world, the Internet that connects two computers actually means
A series of unified standards, these standards are called Internet Protocol, the essence of the Internet is a series of protocol...
The company took over the job of doing a travel website, using the traditional JSP and java, the front-end side can not do I used JQ plus underscore template, test a bug, ie11 access to a page can not open, read the following report underscore syntax error, line by lineTo see if there is a syntax problem in the template, it seems to look right, line by line deletion code to eliminate the problem, found the problem is,Change intoThat’s right. The question of annotation has to be Google’s strength. Write it down and leave it for yourself.
Checkpoint 1.1:
(1)1The addressing capacity of a CPU is 8KB, so the width of its address bus is13position
Because 8KB=8*1024B=2^13
(2)1KBThe memory has1024The number of storage units and the number of storage units.0reach1023
1KB=1024B,Numbering from 2^0 to 2^10-1
(3)1KB=1024B=1024*8bit
(4)1KB=2^10B 1MB=2^20B 1GB=2^30B
(5)8080,8088,80286,80386The width of the address bus is 16, 20, 24, and 32, and the data they can transmit at one time are:64KB,1MB,16MB,4GB
If a CPU has N address lines, you can say that the width of the CPU address bus is N, and you can f...
Chapter 1: basic knowledge
The second chapter: registers
The third chapter: register (memory access)
The fourth chapter: the first procedure.
The fifth chapter: [BX] and loop instructions.
The sixth chapter: a program containing multiple segments.
The seventh chapter: a more flexible way to locate memory addresses.
The eighth chapter: two basic problems in data processing.
The ninth chapter: transfer instruction principle.
The tenth chapter: CALL and RET instructions.
The eleventh chapter: symbol register.
The twelfth chapter: internal interruption.
The thirteenth chapter: int directive
The f...
The problem is Union Find.
Is there any 3 elements that determine whether some sides are tree?
1. The number of edges is not the number of points -1?
2. Each side can not be joined by ring; (when adding edge to do check).
3. When all sides are joined, the edges must be connected; (all sides are added to see the number of Union).
First, define the class of UnionFind. Defining interface
class UnionFind{
int[] father;
int size;
public UnionFind(int size){
father = new int[size];
for(int i = 0 ; i < size; ++i){
father[i] = i;
}
thi...