Linked List is a linear data structure consisting of a collection of nodes which are stored in separated physical memory locations

Each node comprises two parts, the data and the pointer which is linked to the next node. The next pointer of the tail node is linked to null

Operations and Time complexity

  • Traversal O(N)
  • Add First O(1), Add Last O(N)
  • Remove First O(1), Remove Last O(N)

Implementation example