Data structure Learning notes--Introduction

Source: Internet
Author: User

Data structure Learning notes--Introduction in order to describe a data structure more appropriately, it is usually represented by a two-tuple: (for a data structure whose logical structure is unique)

b= (D,r)
where b is a data structure that consists of a set of two-tuple relationships on the set D and D of the elements. That
d={di|1 <= i<= N, n > 0}
r={RJ| 1 <= j<= N, n > 0}
A relationship R on D is a set of order pairs, for any order even <x,y> in R (x, y belongs to set D), the X is called the first node of the even order, the y is called the second junction of the Order, also known as the first node of the second node is the direct precursor (usually referred to as precursor), The second node is called the direct successor of the first node (usually referred to as the successor). If a node does not have a direct precursor, it is said to be the starting junction, and if there is no direct successor to a node, it is said to be the terminal junction.
For symmetric order pairs, where <x,y> is a two-tuple relationship set R and <y,x> is also a two-tuple relationship set R, (x, Y and the same as set D), parentheses are used instead of angle brackets, which is (x, y) belongs to R.


Abstract type of data (abstract date Type,adt)

Abstract data types are available (d,s,p) triples, where D is the data object, S is the set of relationships on D, and P is the basic set of operations for data operations in D.
ADT Pumping Data type name
{
Data objects: Definition of Data objects [D in b= (D,R)]
Data relations: Definitions of data relationships [R in b= (D,R)]
Basic operations: The definition of basic operations
}adt image Data type name


Algorithm analysis


Analysis from time Perspective: Time complexity of the algorithm
Spatial analysis: Spatial complexity of the algorithm

The time complexity of the algorithm usually has, the worst case of time complexity \ Average time complexity of two
Average time complexity: the order of magnitude of the algorithm's expected run time and problem size n when the input scale of the algorithm is equal to the probability of occurrence.

The algorithm spatial complexity analysis, usually only considers the auxiliary variable occupies the space, generally also as the problem scale n function is given in the order of magnitude, record: S (n) = O (g (n))

The calculation method is consistent with the space calculation method.
Work in place \ Work in situ
Specific dependency input, often at worst Tags: Data structures

Data Structure Learning notes--Introduction

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.