What is a linked list

Linked list is a common data structure, it is a kind of linear table, is composed of several string into a sequence of nodes, each node has two areas, the first to call data domain (actually stored value), the second is called a pointer domain (point to the next node address), there is no pointer field in JavaScript this concept, can be understood as a reference point to the next node.

Pointer fields can be implemented in one of the following ways: memory addresses are commonly used in C, array subscripts (relative addresses) are used in some special linked lists, and references are used in JS,JAVA, and Python.

A normal one-way linked list

Linked list performance

Find node O(n), insert node O(1), and delete node O(1).

Application scenarios of linked lists

It is suitable for dynamic data insertion and deletion, but not for quick data locating.

What are the typical application scenarios of linked lists?

1. Dynamic memory allocation in the operating system. 2.LRU cache elimination algorithm.