Talking about the concept of data structure

1. What is a data structure?
Refers to a collection data structure is associated with a data element of another. It consists of two elements, i.e., "data" and "structure."
(1) is a data collection of data elements to be processed, generally speaking, these data elements, having a common feature.
eg: breakfast, lunch, dinner these three data elements have a common feature that they are the names of three meals a day, so as to constitute a set of three meals a day.
(2) the so-called "structural" mean? Is the relationship, is set some kind of relationship that exists between the various data elements (or contact). In the field of data processing, usually the relationship between data elements pairwise relationship with the longitudinal member (direct successor or predecessor direct relationship) will be described.
eg: In considering the chronological relationship of three meals a day, "breakfast" is "lunch" antecedent (or direct precursor), and "lunch" is "breakfast" after the piece (or direct successor); likewise, " lunch "is" dinner "antecedent," dinner "is the" lunch "after pieces.
(3) the data structure into the data storage structure and logical structure data.
a, it refers to a logical structure data of the logical (i.e., longitudinal member relationship) between the data elements of the data structure to reflect.
B, the data storage structure, also known as the physical structure data, logical structure data is stored in a computer memory space.
2 represents a data structure of
the mathematical form of (1) the definition of the logical structure of data - data structure is a binary group:
B = (D, R)
wherein, B represents the data structure, D is a collection of data elements, R is D set on the relationship, which reflects the relationship between the longitudinal member D data elements, the relationship between the front and rear members may be represented by a tuple.
eg:. a If three meals a day as a data structure that can be expressed as:
B= (D,R)
D = {breakfast, lunch, dinner}
R = {(breakfast, lunch), (lunch, dinner)}
. B data structure of the military forces, may be expressed as:
B=(D,R)
D = {commander, platoon, squad, soldiers}
R = {(commander, platoon leader), (platoon, squad), (monitor, warrior)}

Guess you like

Origin www.cnblogs.com/lwtyh/p/11873176.html