A Linked List is a dynamic data structure used to store a collection of elements. Unlike arrays, a linked list does not store elements in continuous memory locations.
Instead, it is made of several small parts called nodes.
⢠Data ā the actual value
⢠Pointer (Reference) ā the address of the next node
So nodes are connected through pointers, forming a chain.
[10 | next] ā [20 | next] ā [30 | next] ā NULL
ā No memory is wasted
ā Insertion and deletion are fast (no shifting like arrays)
ā Extra memory for pointers
ā Cannot access elements directly by index