Linked List
A linked list is a linear data structure. It is a collection of objects defined as nodes. But in the linked list, nodes are stored in random positions in memory and not stored in contiguous locations. A node of the linked list consists of: A data item. An address of the next node. class Node { int data; Node *next; }; This representation of the node is used to create every node in the list.