Traditional Culture Encyclopedia - Traditional virtues - What storage structure does the computer have?
What storage structure does the computer have?
1, array
Arrays are like small cells next to each other. Each cell has its own serial number, which is called an index. Different from life, the usual counting habit begins with "1", but in the computer, "0" is the first number at the beginning.
The data in the array, in the computer's memory, are also stored in continuous locations. When we look for the data we need, we can find the data through the index in the grid.
2. Linked list
Linked lists are stored in a way that is a bit like the relationship between address and residence. The address can be written on a piece of paper, but that doesn't mean that the houses are close. The data in the linked list is also stored in all parts of the computer, but the linked list not only stores data, but also stores the address of the next data, so as to find the next data.
Unlike arrays, linked lists store data that need to be set in advance, just as the length of a train will increase with the number of passengers.
Extended data
The chain storage structure of data can be represented by a linked list.
Where the data represents the range and is used to store the numerical part of the node. Pl, p2, …, Pill( 1n≥ 1) are all pointer fields, and each pointer field is the storage location of the node where its corresponding successor or predecessor element is located (hereinafter referred to as successor node or predecessor node).
The corresponding successor node or predecessor node can be accessed through the pointer domain (also called chain domain) of the node. If the pointer field in one node does not need to point to other nodes, its value is NULL.
In the sequential storage of data, because the storage location of each element can be obtained by simple calculation, the time of accessing elements is the same; In the linked storage of data.
Because the storage location of each element is stored in its predecessor or successor node, after accessing its predecessor or successor node, it can only be accessed according to the pointer, and the time to access any element is related to the location of the element node in the chain storage structure.
Baidu Encyclopedia-Storage Structure
- Previous article:Northeast folk lullaby
- Next article:What's the name of an instrument like guitar?
- Related articles
- How to adjust the buoy for freshwater fishing? What is the ratio of buoy to plumb?
- Chinese New Year Diary 500 words
- Disadvantages of watching movies in English composition in English class
- Analysis of investment opportunities in infrastructure industry, what is the development prospect?
- “Self-abandonment education” can be seen everywhere around us. How do we view self-abandonment education?
- Brief introduction of Wu Guanzhong
- 30 Names of Morning Games in Kindergarten Small Classes
- What does service industry mean?
- Theme planning scheme of community activities
- Is the Belt and Road a commercialization of traditional culture? Should traditional culture be commercialized?