Home>Article> What are the characteristics that linked lists do not have?

What are the characteristics that linked lists do not have?

青灯夜游
青灯夜游 Original
2020-12-02 16:25:09 34393browse

The characteristic that linked lists do not have is "random access to any element". If you want to access an element in a linked list, you must traverse from the head of the linked list to find the element to be accessed. Unlike an array, which can be accessed by specifying a subscript, you cannot randomly access any element in a linked list. This is also the purpose of a linked list. Features that are not available.

What are the characteristics that linked lists do not have?

#The operating environment of this article: Windows 7 system, Dell G3 computer.

The characteristic that linked lists do not have is ______.

A. Can randomly access any element

B. Insertion and deletion operations do not need to trigger elements

C. No need to estimate the size of storage space in advance

D. The required storage space is proportional to the length of the linear table

Correct answer:A

Answer analysis:

Insertion into linked list, The deletion operation does not need to activate the element. It only needs to modify the pointer of the node to complete this adjustment; and since when adding a node to the linked list, space can be dynamically applied for, so there is no need to estimate the size of the storage space in advance. ;The storage space required for each node of the linked list is the same, so the more elements the linear list has, the more total storage space it requires. There is a direct proportional relationship between them.

If you want to access an element in a linked list, you must traverse from the head of the linked list to find the element to be accessed, unlike an array that can be accessed by specifying a subscript. Therefore, it is impossible to randomly access any element in the linked list, which is also a feature that linked lists do not have.

The above is the detailed content of What are the characteristics that linked lists do not have?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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