Chapter 1 Overview
What is a data structure? Data with a certain organizational structure.
Why use the data structure? Improve program execution efficiency.
What is an algorithm? The process of executing a specific task.
Most algorithms are directly applied to a certain type of data structure. We need to know that the algorithms mainly include inserting new values, searching for given values and deleting given values, as well as iteration, sorting, and recursion.
Specific data structures include: group, ordered group, stack, team, linked list, binary tree, multi-tree, hash table, heap, and graph.
GROUP: Fast insert and value; Fixed Length of slow query and Deletion
Ordered Group: the search speed is higher than that of unordered groups. The slow length of insertion and deletion is fixed.
STACK: backward-forward, FIFO; slow Value
Team: FIFO; slow Value
Linked List: Fast insertion and deletion; slow Query
Binary Tree: Fast query, deletion, and insertion; complicated deletion Algorithms
Multi-tree: Fast query, deletion, and insertion, and complex tree-based storage Algorithms
Hash Table: Fast insertion if the key value is fixed; slow deletion if the key value is not fixed; memory consumption.
Heap: Fast insertion and deletion; slow Value
Figure: real-world models; some algorithms are complex and slow;
Object-Oriented programming ideology: Classes encapsulate data and methods, declare references, and generate objects, method providers, and users. Inheritance polymorphism.