A linked list is a linear data structure in which elements are stored in joining
nodes
, and each node has a reference to the next node.
Linked lists are
dynamic
data structures, meaning that the size of the list can change
Linked
lists
can be singly-linked or doubly-linked list
Linked lists are useful for
implementing
stacks and queues, as well as for quickly inserting and deleting
One of the main
benefits
of linked lists is that they do not require the element items to be stored contiguously in memory,
The
head
of a linked list is the first node in the list, and the tail is the last node.
Linked lists have a lower
overhead
compared to arrays, but they have a higher overhead than arrays in terms of memory
Familiarize Yourself with Struct in data structure