A sentence to understand what is called data structure and algorithm, try to let people who do not understand the program can understand
This issue has been closed due to non-development-related issues directly
Reply content:
A sentence to understand what is called data structure and algorithm, try to let people who do not understand the program can understand
The data structure is like how the books on your bookshelf are placed,
The algorithm is how to quickly find a book on the shelf
program = data structure + algorithm
A data structure is a collection of one or more specific relationships that exist between each other. Includes 4 basic structures: Set, line structure, tree structure, graphic or mesh structure. The popular point is the logical structure of the data, such as what kind of structure the data is stored in memory.
The algorithm is actually a method of accomplishing one thing in the course of programming, for example, in real life, when doing math problems, two people will complete the problem but they have a short time between them because of the simple method. Also in the programming process to adopt a good algorithm can reduce the time and space complexity of the program
Personal explanation ...
Data structures are organized in a way that can be explained by computers in the real world.
The algorithm is the calculation of the data structure described in the increase and deletion of things.
Personal understanding
数据结构:数据元素的集合,是研究怎么去组织数据算法:完成一件事情的步骤
Data structure, there are many ways to describe. In the book is more common is the pseudo-code to write the ternary group. No matter how a data structure is described, the core of it is that when defining or using it, it is important to highlight how the data elements in this data structure are joined together and what can be done with it, such as a tree, that is, the sequence relationship can be applied to find operations, but can not be applied to delete edge operations, Because the edges are owned by graphs of this data structure. There is no point in how the data elements are organized together, because there is no manipulation of the data, this is the relationship between the structure and the algorithm, so now discuss the data structure. It is generally to be clear about the composition of the data elements of this data structure, how the data structures are organized, and the operation of the structure.