-
A data structure is the way a computer stores and organizes data.
A data structure is a collection of arguments between data elements that have one or more specific relationships with each other. Often, a well-chosen data structure can lead to higher operational or storage efficiency. Data structures are often associated with efficient retrieval algorithms and indexing techniques.
The logical structure and storage structure of data are two closely related aspects of data structure, and the same logical structure can correspond to different storage structures. The design of the algorithm depends on the logical structure of the data, while the implementation of the algorithm depends on the specified storage structure.
The research content of data structure is the basis for constructing complex software systems, and its core technology is based on decomposition and abstraction. Through decomposition, three levels of data can be divided; Then, through abstraction, discarding the concrete content of the data element, the logical structure is obtained. Similarly, the definition of an operation is obtained by dividing the processing requirements into various functions through decomposition, and then by abstracting and discarding the implementation details.
Introduction to the physical structure of the data:
The physical structure of data is the representation (also known as an image) of the data structure in a computer, which includes the in-machine representation of the data element and the in-machine representation of the relationship. Since there are many kinds of specific implementation methods, such as order, link, index, hash, etc., a data structure can represent one or more storage structures.
In-camera representation of data elements (imaging method): Data elements are represented by binary bit strings. This bit string is often referred to as a node.
When a data element consists of several data items, the sub-bit strings corresponding to each data item in the bit string are called datafields. As such, a node is an in-machine representation (or in-machine image) of a data element.
Sequential and chained storage structures. Sequential images represent logical relationships between data elements by their relative positions in memory. A non-sequential image uses a pointer that indicates where the element is stored to represent the logical relationships between data elements.
For the above content, please refer to: Encyclopedia - Data Structure.
-
Data structure, understood to put it bluntly, is the study of how data is stored.
We know that data storage has only one purpose, that is, to facilitate the reuse of data in the future, just as we use array storage to obtain their sum value later, and data storage behavior without reason is irresponsible for storage space.
Therefore, the storage of data in the storage space of the computer is by no means arbitrary, which requires us to choose a good way to store data, which is also the core content of the data structure.
Navigation is undoubtedly a must-have artifact for travel, and in the eyes of our programmers, no matter which navigation software it is, the realization of its navigation function needs to be supported by a large amount of map data. Obviously, this data is never stored using variables or arrays, which would be a tragedy.
For this type of data, the data structure provides a graph storage structure, which is specifically used to store this type of data.
It can be realized that the data structure teaches us not only how to store such simple data, but also to solve the problem of storing a large amount of data with complex relationships.
A data structure is a collection of data elements that have one or more specific relationships with each other.
A data structure includes a set of data objects and how they are organized in a computer, i.e., their logical and physical storage structures, as well as the set of operations associated with the set of data objects, and the most efficient algorithms to achieve them.
So, what is the data structure? In my opinion, data structure is a discipline that teaches us how to store data with complex relationships that is more conducive to later reuse of data.
-
1.What are the advantages of a sequential storage structure?
Answer: a. The method is simple and easy to implement (array);
b. There is no need to add additional overhead to represent the logical relationship between nodes;
c. Random access by element serial number;
2.Linear tables.
Sequential or linked storage? Do I have to occupy a contiguous storage unit for storage?
Answer: Linear tables can be stored sequentially or chained, sequential storage needs to occupy a contiguous space, and chained storage does not need contiguous space.
3.What is a doubly linked list?
Answer: Compared with a single-linked list, a doubly linked list has an extra pointer to the precursor;
4.Do the head nodes in a linked list only serve as identifiers?
Answer: The addition of the head node is completely for the convenience of operation, and the addition of the head node does not need to deliberately distinguish whether a node is the head node or not when the program is designed, so that the processing of empty tables and non-empty tables is consistent.
5. When a linear table is stored in a linked list, the storage space of the nodes and the inside of the nodes can be discontinuous. Is this true?
A: Not true. 6. Sequential storage mode insertion and deletion is too inefficient, so it is not as good as chain storage mode. Is this true?
Answer: In terms of the efficiency of inserting and deleting, the efficiency of sequential tables is not as good as that of chain storage, but it does not mean that it is not as good as chain storage.
5.for any data structure.
A chained storage structure is necessarily better than a sequential storage structure. Is this true?
6.The sequential storage method can only use the pre-stored linear structure. Is this true?
A: Not true. Sequential storage space can also be dynamically allocated.
7.The so-called static linked list machine is a linked list that has never changed. Is this true?
A: Not true. A static linked list describes the chain storage structure of a linear table by means of an array of groups, and the nodes also have the data field data and the pointer field next, but here the pointer is the relative address of the node.
The maximum number of elements that can be contained in a static linked list is determined at the time the table is defined and cannot be increased later.
8.A linear table is a sequentially stored table. Is this true?
A: Obviously wrong, for a slight reason.
9.In order to facilitate the insertion and deletion of data, which one is more efficient, is the linked list storage structure or the sequential storage structure.
A: Chained storage structure.
See if it meets your requirements, I'm so capable. o(∩_o~
-
The sequential storage structure is a bit small in terms of storage space. The others don't seem to be of much merit.
-
1. The storage address is continuous, and it is easy to find another according to one node.
2. No, linear tables are divided into two types: sequential tables and linked lists, the former has continuous storage space, and the latter is not continuous.
3. Each node contains two pointers, which point to its own forward and subsequent respectively, so it is bidirectional.
4. No, its role is also to facilitate insertion, search operation of the unified realization of the first writing.
5. Correct, for example, each node is a connected table, then the internal space of the node is not continuous.
6. When the amount of data is large and needs to be moved many times, it is indeed not as convenient as the linked list, but it can be ignored when the amount of data is small.
7. No, the static linked list is relative to the commonly used linked list, it is implemented by using arrays, and each element of the interim array is a relative storage position in the array with its successor or precursor node.
8. No, it also includes linked lists.
9. Linked lists are more efficient.
-
You're too much, isn't it? I know a little, but it's too much trouble to break it down for you.
-
The first question on the first floor is already there.
There is no problem with the second draft spike Choose D, many people choose C, because they do not take into account the difference between the single-cycle linked list with a tail pointer and the double-cycle linked list with a leading node when deleting a node, deleting a node at the end is, in a single-cycle linked list with a tail pointer, the finger key nano-needle has to iterate sequentially to the previous digit of the node to be deleted, if the length of the linked list is n, then the time complexity is O(N), and the double-cycle linked list with the silver node with the lead only needs to modify the front pointer to have a time complexity of 0 (1).
Hope mine is helpful to you.
-
The operation is to access any of the specified sequence numbers.
This decision has to be a sequential table, otherwise what if any data is fetched based on a specified ordinal number?
-
A data structure is an abstract data model that is used in an application to facilitate data storage.
For example, an integer is a basic data type. Then an integer array is a data structure.
Small applications are done with basic data types, but when the application is large, it becomes inconvenient to store the base types, so data structures are needed.
For example, if you need to perform arithmetic operations on two integers, define 3 integers and 0k, two inputs and one output. But if you want to perform arithmetic operations on 100 pairs of integers, and you need to record these 100 results, then you need to use arrays, of course, you can also use linked lists, etc. It depends on the application.
Commonly used data structures include: arrays, linked lists, queues, stacks, trees, hash tables, graphs, etc.
The benefit of using data structures to store data is that it can be organized in a regular and orderly manner.
-
Data structure: The way a computer stores and organizes data.
-
A data structure is the way a computer stores and organizes data.
-
For a computer storage of a thing, for example, a tree can be stored in a set, a binary tree can be stored in an array, and a graph can be stored in an array.
I would like to introduce you to Yan Weimin's textbook "Data Structure" (C language version), which is currently a classic textbook with a good reputation in China. >>>More
The creation sequence table is as follows:
by the array element a[0..n-1] to create a sequential table l. Each element in a is placed sequentially in a sequential table, and n is assigned to the length field of the sequential table. The algorithm is: >>>More
This is a problem with queue operations. (Actually, you should give the definition of the queue operation function.) But I'm smart. Hey. You don't have to give. ) >>>More
Just o(n) scans it once, millions of arrays are not big, and c can be opened so big for global variables. >>>More
A hash table (also known as a hash table) is a data structure that is directly accessed based on the key value. That is, it accesses records by mapping key values to a location in the table to speed up lookups. This mapping function is called a hash function, and the array that holds the records is called a hash table. >>>More