Types of Linked List in Data Structure

Types of Linked List in Data Structure

In this tutorial you are going to learn about Types of Linked List in Data Structure.

Types of Linked List in Data Structure

There are three types of linked list in data structure.

  1. Singly Linked List
  2. Doubly Linked List
  3. Circular Linked List

Singly Linked List

  • The one-way implementation of a general list having elements.
  • The pointer START is a special pointer which stores the very first address of a linked list.
  • The next pointer of the last node stores NULL value, which means this node is not pointing to any other node i.e., it is the last node in the list.
  • Traversal is allowed only in one way.

Doubly Linked List

A Doubly Linked List (DLL) contains an extra pointer, typically called previous pointer, together with next pointer and data which are there in singly linked list.

Advantages

  • A DLL can be traversed in both forward and backward direction.
  • The delete operation in DLL is more efficient if a pointer to the node to be deleted is given.

Disadvantages

  • Use extra memory.
  • All operations require an extra pointer to be maintained.

Circular Linked List

  • Linked list where all nodes are connected to form a circle.
  • It can be a singly circular linked list or doubly circular linked list.
  • No NULL at the end.

Applications of Linked List:

  • Linked lists are used to represent and manipulate polynomials.
  • Hash tables use linked lists for collision resolution.
  • Any "File Requester" dialog uses a linked list.
  • Linked lists are used to implement stack, queue, trees and graphs.
  • To implement the symbol table in compiler construction.

Some Common Variables use in Linked List:

  • START: Store the address of first node.
  • AVAIL: Store the address of first free space.
  • PTR: Points to node that is currently being accessed.
  • NULL: End of list.
  • NEW_NODE: To store address of newly created node.

This article on 'Types of Linked List in Data Structure' is contributed by Ritika Nagar (BCA, Sharda University). If you like TheCode11, then do follow us on Facebook, Twitter and Instagram.

Previous Post Next Post

Contact Form