What is data structure and algorithm?

Source: Internet
Author: User
A clear statement is called a Data Structure and algorithm. Try to make it clear to those who do not understand the program, and try to make it understandable to those who do not understand the program.

This problem has been disabled due to issues not directly related to development.

Reply content:

A clear statement is called data structures and algorithms. Try to make it understandable to people who do not understand the program.

The data structure is like how books are placed on your shelves,
The algorithm is how to quickly find a book on the shelf.

Program = Data Structure + Algorithm
A Data Structure is a collection of data elements with one or more specific relationships. There are four types of basic structures: Set, linear structure, tree structure, graph or mesh structure. The common point is the logical structure of the data, for example, the structure in which the data is stored in the memory.

The algorithm is actually the method used to complete one thing in the programming process, for example, in real life, when two people are doing a math problem, they will finish the problem, but the time between them is very short because they adopt a simple method. Using good algorithms in programming can also reduce the time-space complexity of programs.

My explanation...
The data structure is to organize things described in reality in a way that can be interpreted by computers.
An algorithm is an operation that adds, deletes, modifies, and queries the items described in the data structure.

Personal Understanding

Data structure: a collection of data elements. It is a step to study how to organize data algorithms: to accomplish one thing.

There are many ways to describe the data structure. In the book, it is common to use a pseudo code to write a triple. The core point of describing a data structure is that when defining or using it, we must highlight how the data elements in this data structure are connected together and what operations can be applied to such data, such as tree, that is, sequential relationships can be applied to search and other operations, however, edges cannot be deleted because they are owned by data structures such as graphs. It makes no sense to organize data elements together, because data is not processed without operations. This is the relationship between the data structure and algorithms. Therefore, we will discuss the data structure. It is generally necessary to clarify the composition of the data elements of the data structure, how the data elements of the data structure are organized, and the operations on the data structure.

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.