The data structure is used to store information, while Algorithm Is used to operate data. Frequently used methods for storing information: arrays, linked lists, indirect addressing, and analog pointers, among which several arrays and linked lists are the most common. Many complex data structures are implemented based on arrays and linked lists, so learning the two is very important for learning data structures.
Array
Arrays are suitable for applications that require fast search, insertion, and deletion of elements. NOTE: If static arrays are used, there is a capacity limit. If you Program Performance is very concerned, so even if you use a large array, it is a waste, do not use Dynamic Linked List, otherwise the cost of malloc and free is enough for you.
Linked List
The linked list is suitable for applications that often insert or delete objects but do not search for many objects. One of the more attractive aspects of the linked list is its dynamic adaptability, but it also brings performance loss.
Stack
A stack is a data structure of "LIFO -- last in first out". That is to say, the elements you get from the stack are the one you just put in. This feature is especially suitable for tasks with multiple sub-tasks. Common applications include: 1) Saving the return address, parameters, and local variables of subprograms during function calls; 2) matching parentheses in processing expressions; 3) when the compiler analyzes the syntax, it is used to save the mark of various syntax elements; 4) Non-Recursive Implementation of recursive functions.
The underlying implementation of the stack is commonly used as a dynamic array or linked list.
Queue
....
Tree
....
Figure
....
Set
....