Data structure: The way in which it is arranged in the computer's storage space.
Algorithms: Software programs manipulate the data processes of these structures.
Data structure Type
1. Arrays:
Advantages: Fast insertion, direct subscript can be accessed quickly.
Cons: Find slow, delete slow, fixed size.
2. Ordered arrays:
Pros: Faster than no need for array lookups.
Cons: Delete and insert slow, fixed size.
3. Stack:
Advantage: Provides access to the last-in, first-out way.
Cons: Accessing other items is slow
4. Queue:
Advantages: Provide first-in, out-of-the-way access.
Cons: Accessing other items is slow.
5. Linked list:
Pros: Insert fast, delete fast.
Cons: Find slow.
62 Fork Tree:
Pros: Find, INSERT, delete all fast. (such as fruit trees to maintain balance)
Cons: The removal algorithm is complex.
7. Red-Haishi:
Pros: Find, INSERT, delete all fast. And the tree is always balanced.
Cons: The algorithm is complex.
8.2-3-4 Tree:
Pros: Find, INSERT, delete all fast. The tree is always balanced, and similar numbers are useful for disk storage.
Cons: The algorithm is complex.
9. Hash Table:
Advantage: If the keyword is known, the access is extremely fast and the insertion speed
Cons: Delete slow, if you do not know the keyword access is slow, the use of storage space is not sufficient.
10. Heap:
Advantages: Insert, delete fast, access to the largest data item quickly.
Disadvantage: Slow access to other data items.
11. Figure:
Pros: Modeling the real world.
Cons: Some algorithms are slow and complex.
An overview of the algorithm
1. Insert the data.
2. Find the data.
3. Delete the data.
Basic concepts of data structures and algorithms