[C Language] Data Structure-standard of measurement algorithm, data structure Algorithm

Source: Internet
Author: User

[C Language] Data Structure-standard of measurement algorithm, data structure Algorithm

1. algorithm standards

Algorithm

Solutions and steps

Measure algorithm standards

1. Time Complexity

Probably the number of times the program is executed, rather than the execution time. The running time of different machines must be different.

2. space complexity

The maximum memory occupied during Algorithm Execution

3. Difficulty level

Easy to understand and read

4. robustness

 

2. Data Structure status

Data structure is the core course in Software

Program = Data Storage + Data Operations + executable languages

 

Common time complexity:

Constant order O (1) <logarithm order O (log2n) <linear order O (n), <linear logarithm order O (nlog2n)

<Squared order O (n ^ 2) <cubic order O (n3) <k O (n ^ k)

<Exponential order O (2 ^ n) <O (n !) <O (n ^ n)

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.