Data Structures-Linked List Overview

Linked List

A linked list is a linear data structure, in which the elements are not stored in contiguous memory locations. The elements in the linked list are linked using pointers.

In the data structure, we will be implementing linked lists which always maintain head and tail pointers for inserting values at either the head or tail of the list is a constant time operation. We cannot able to insert values randomly in linked list and we follow the linear operation. The following are the various operations and their complexity:

Operation

Complexity

Insertion

O(1)

Deletion

O(n)

Searching

O(n)


Linked list have few advantages that makes efficient for implementing. They are

  • The list is dynamic and hence can be resized based on the requirement.
  • Secondly, the complexity for inserting an element is O(1)

Types of Linked list

They are,

  • Singly Linked List
  • Doubly Linked List
  • Circular Linked List