Data structure notes (i)

Source: Internet
Author: User

data : A symbol that describes an objective thing. (probably equivalent to the object class in Java)

Data Elements : The basic unit of meaning that makes up the data. (probably equivalent to a class object in Java)

Data Items : Compose data elements. (may be equivalent to member properties or methods in Java)

Data Objects : A collection of data elements of the same nature, a subset of the data. (probably equivalent to a collection or array or queue or stack in Java)

Logical Structure : the interrelationship between data elements in a data object . (Set structure, linear structure, tree structure, graph structure)

Physical Structure : How the logical structure of data (storage structure) is stored on the computer. (Sequential structure, chained structure)

algorithm : Describes the resolution steps for a specific problem. (Characteristics: input, output, poor, feasible, OK)

The evaluation algorithm is good or bad: readability, robustness, correctness, high time efficiency and low storage capacity.

time Efficiency : The most important thing when analyzing a program's operation time is to look at the program as an algorithm or a series of steps independent of the programming language, and the time efficiency depends primarily on the number of executions of the basic operations consumed at run time.

time complexity of the algorithm : When the algorithm is analyzed, the total number of executions of the statement T (N) is a function of the problem size n, which then analyzes the change of T (n) with N and determines the order of magnitude of T (N). The time complexity of the algorithm. That is, the time measurement of the algorithm, recorded as: T (n) = O (f (n)). It indicates that with the increase of the input size n, the growth rate of the algorithm execution time is the same as the growth rate of f (n), which is called the asymptotic time complexity of the algorithm, which is referred to as the complexity of time. where f (n) is a letter of question size n.

Derivation Time complexity : 1. Replace the addition constant term in the operation with the constant 1, 2 if the highest order of n is reserved, and 3 removes the constant of the highest order. (Analysis of the complexity of the algorithm, the key is to analyze the circulation structure of the operation of the situation)

common time complexity takes from small to large : O (1) <o (LOGN) <o (n) <o (Nlogn) <o (n2) <o (n3) <o (2n) <o (n!) <o (NN)

the spatial complexity of the algorithm : by calculating the storage space required by the algorithm, the computational formula of the algorithm space complexity is as follows: S (n) = O (f (n)), where n is the scale of the problem, and F (n) is the function of the statement about the storage space occupied by N.

Data structure notes (i)

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.