The first chapter finishing data structure knowledge points

data structure

Chapter One Introduction

1. The data storage structure which includes several types? Logical data structure which includes several types?

       Storage structure includes sequential storage, chain stores, the index storage, a hash is stored.

       Logical structure including linear structure,

Nonlinear structure (a set of the tree structure, pattern (net) structure)

2. The data structure is a study of what subject?

       Data structure is a study in non-numerical programming problems, the operation target computer and the relationships between objects and applied to the object of the operation and the like subjects.

3. The relationship between data elements have several representations in the computer? What are the characteristics?

       Four kinds of representation:

  1. Sequential storage

Data storage element order, each storage node contains only one element. Storage locations reflecting the logical relationships between data elements. Storage density, but some operation (e.g., insert, delete) less efficient.

  1. Chain storage

Each storage node comprises, in addition also contains a set of data elements outside the information (at least one)

pointer. Pointer reflects the logical relationships between data elements. This embodiment does not require continuous storage space, to facilitate the dynamic operation (e.g., insert, delete, etc.), but a large storage space overhead (for pointers), and the like additionally can not binary search.

  1. Index storage

Except in a contiguous memory address space, still need to establish a data element stored in a storage location index indicating the storage node entries of an index table, the index table (index) storage zone or endpoint (subscript, dense non-indexed), and static and dynamic characteristics.

  1. Hash storage

Using a hash function and conflict resolution method, the hash key in a continuous address space is limited, and interprets the value of the hash function to store the address of the element containing the keywords. Characterized by access speed, random access only to keywords, not sequential access, access can not be binary.

4. How data types and abstract data type is defined? What's the similarities and differences between the two? What are the main features of an abstract data type is? What are the main benefits of using ADT is?

"Data type" is a concept programming language, which is a set of operations and set of values, such as the C language integer, real, character and the like. Integer value (integer ranging should have specific machine) operation plus, subtraction, multiplication, division, etc. remainder. In fact, the data type is provided by the manufacturer to the user data structure has been achieved .

"ADT" refers to a mathematical model and a set of operations defined in the model. "Abstract" in the sense that the data type of mathematical abstraction features . Abstract data type definition depends only on its logical characteristics , and their implementation-independent and represents how the inside of the computer . Regardless of their internal structural changes, as long as it does not affect the mathematical properties unchanged its external use.

Abstract data types and data types is essentially a concept, but a broader range of abstract data types, it is no longer confined to the machine and to achieve the defined data type , further comprising a data type of the user in the design of the software system is self-defined .

Abstract data type definitions using software module containing the definition, represents achieve three parts, packaged together, transparent to the user (provides an interface), without knowing the implementation details.

Abstract data types appear to make the program design is no longer "art", but to "science" a step forward.

 

5.

  1. In the data structure of the course, the logical structure of the data, the data storage structure, there is what is the relationship between the operation data?

Logic (i.e., an associated manner between the data elements or "adjacency") reflecting the logical structure of data between the data elements.

The data storage structure is a data structure represented in a computer, and includes a representation showing the relationship between data elements.

Computed data is a set of operations on the data definition, operation is independent of the logical structure defined, and the storage structure, the operation and implementation depend storage structure.

 

  1. If the same logical structure, but a different storage structure was different data structures. This argument, right? for example.

The same logical structure, but a different storage structure may be different data structures.

For example: the logical structure belonging to the linear form linear structures, sequential storage structure of sequence table, while the use of the chain storage structure called a linear list.

  1. On a given logical structure and stores a set of different operations can be defined, whereby different data structures. This argument, right? Illustrated with examples.

Pair stacks and queues of the same logical structure , which stores a may be the same (and chain stores sequential storage), but because of its different operational set and referred to different data structures .

  1. What evaluation criteria are a variety of different data structures?

Evaluation of the data structure is very complicated, consider two aspects:

First, the selected data structure is accurately and completely describe the basic features of the problem ;

Second, whether or not easy to implement (e.g., decomposition of the data is appropriate;

Whether to select the logical structure adapted to the function calculation,

It is conducive to the realization of the operation;

The basic operation of choice is appropriate)

6. A good evaluation algorithm, several areas where you are to consider?

       Good evaluation algorithm has four aspects:

       One: the algorithm correctness

       II: algorithm legibility

       Three: the algorithm robustness

       Four: the algorithm time and space efficiency (efficiency and low memory requirements)

7. explain and compare each group concept:

  1. Time complexity of the algorithm

The time complexity of the algorithm is a function of the input size of the algorithm .

Enter the size or scale of the problem algorithm as data input to the algorithm is the number of data elements contained , with this number or other parameters related . Sometimes consider the algorithm in the worst case time complexity or complexity of the average time.

  1. algorithm

Algorithm is described for a particular problem solution step , be a finite sequence of instructions, where each instruction represents one or more operations. Algorithm has five important characteristics: there are poor, certainty, feasibility, input and output .

  1. Frequency

When analyzing the time complexity of the algorithm, the original may need to estimate the operation of the basic operation, which is performed up to a number of operations, number of times the operation is repeated is referred to as frequency.

8. data structures and data types What is the difference?

       "Data Structure" The term has two meanings: First, as the name of a course; the second is as a scientific concept. As a scientific concept, there is no accepted definition, is generally believed, to discuss the data structure to include three aspects, the logical structure of the data, the data storage structure, operation data.

"Data type" is a collection of values ​​of the set and the operation can be considered as a data structure has been achieved, the former which is a simplified case.

9. Make time the main factors affect the efficiency of an algorithm (or program) short list, and pointed out that the factors which the algorithm (or program) itself directly related.

       Prior estimation algorithm running time of the main consideration "scale" of the problem and the number of "basic operation" algorithm execution .

       "Scale" problem refers to the number of problem to be solved , such as finding the number of elements, the more the number of elements, the longer the time needed to find, which is the main factor affecting the running time of the algorithm.

       "Basic operation" algorithm mainly operate in solving certain problems , such as in the operation to find the comparison operation between elements can be seen as the basic operation, the less often perform basic operations, the shorter running time, number of times to perform basic operations the more, the longer running time.

Published 17 original articles · won praise 11 · views 8004

Guess you like

Origin blog.csdn.net/LOVE_Me__/article/details/82718679