Algorithm time complexity and data storage structure

Hello, hello, I am Dabai (●—●)

Algorithm time complexity

1<log2n<n<n2

Data storage structure

There are generally four ways to store data:
1. Sequential storage
2. Chain storage
3. Index storage
4. Hash storage

Computer Turing Award winner N. Wirth once proposed a famous formula: algorithm + data structure = program
algorithm is to solve program problems and process steps (sequential structure / sub-structure / loop structure), data structure: the data according to a certain specific Structure preservation

The main research of data structure is: the logical structure of data, that is, the logical relationship between
data relationships; the storage structure of data, that is, the representation of the logical structure of data in the computer; the
operation algorithm, that is, the insertion, deletion, modification, and query of data And sorting etc.

The data element is the basic unit of data, and its subordinates can be divided into several data items. The data item is the smallest unit of data meaning;
in the database, data items are also called fields/domains. It is the indivisible smallest unit of identification of data.
Data, data elements, and data items constitute the three layers of data organization. Among them, the data element is an "individual" in the data, the basic unit
of the data , and also the basic unit discussed in the data structure. The data element is a collection of data items.

Whether it is a doubly circular linked list or a singly linked list, any addition or deletion of nodes should follow the principle of "connect first, then breakpoint".
Inserting a doubly linked list first points the two pointers of the newly added node to the correct position, that is, q->prior =p;q->next=p->next;
Then move the node behind the original linked list to point to the new node, p->next->prior=q; point the node in front of the original linked list to the new node p->next =q; The
most important order is: p->next cannot be changed before q establishes a bidirectional connection with the node behind the original linked list, otherwise the original linked list is broken and the latter cannot be found

Dabai accompany you to make progress together!
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_42292697/article/details/112680266