Home > Common Problem > Why is an array called a random storage structure?

Why is an array called a random storage structure?

藏色散人
Release: 2020-05-09 10:50:36
Original
8793 people have browsed it

Why is an array called a random storage structure?

Why is the array called a random storage structure?

In computer science, random storage represents access to a random component of a sequence at the same time. The opposite is called sequential access, which means it takes more time to access a remote component.

The array uses a continuous storage space for storage, and the elements are stored one by one. If you know the position of the first element, you can directly know the position of the x-th element, which can be done in O(1 ) time access, which conforms to the definition of random storage, so it is a random storage structure.

The above is the detailed content of Why is an array called a random storage structure?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template