Data structure and algorithm 1--introduction __ data structures and algorithms

Source: Internet
Author: User

Data structure: including logical structure and physical structure (logical structure in the computer storage form).

Four logical structures: 1. Set structure 2. Linear structure (one-to-one) 3. Tree structure (one-to-many) 4. Graphic structure (many-to-many).

Physical Structure

Storage mechanism form of data element:

1. Sequential storage: The data elements are stored in the address continuous storage unit, the logical relationship and physical relations are consistent, such as arrays;

2. Chained storage: More flexible than sequential storage structure, storing data elements in any storage unit that can be contiguous or discontinuous. So its storage relationship does not respond to logical relationships and requires a pointer to the address of the data element.

Second, the algorithm: to solve the specific problem solving the description of the steps.

The characteristics of the algorithm: input (0 or more), output (one or more), poor, deterministic, feasible.

Algorithm Design requirements: correctness (no grammatical errors, can produce to meet the requirements of the output, can produce specifications to meet the specification, the test input to deliberately difficult to meet the requirements of the output), readability, robustness, high time efficiency and low storage volume.




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.