What is a data structure, what is an algorithm?

Source: Internet
Author: User
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.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.