The following are the video to see Hao Bin teachers and curricula, review, copy and paste from notes.
List
algorithm
Popular definitions:
Solving methods and procedures
Narrow definition:
Operation of the stored data
Different storage structure, to complete the operation performed by a single function is not the same
such as:
To output array operation of all elements of the operation and to output the list of all elements is certainly not the same
this means:
Algorithm is dependent on storage structure
Different storage structures, algorithms executed is not the same
Broad definition:
Generalized algorithm, also known as generic
No matter how the data is stored, the operating data are the same
We can store data by at least two structures
Array
advantage:
Access speed
Disadvantages:
A continuous need a lot of memory
Insert and delete elements of the efficiency is very low
List
Terminology:
The first node: the first valid data storage node
Tail node: node storing the last valid data
Head node:
Type data type and the first node of the head node is exactly the same
In front of the head node is the first node that node
The first node does not store valid data
The purpose of providing the head node is to facilitate the operation of the list
Head pointer: a pointer variable to store the address of the head node
Determine a list requires an argument
Head pointer
advantage:
Remove elements inserted high efficiency
You do not need a lot of contiguous memory
Disadvantages:
Find a location low efficiency elements