top of page

Summary on Linked List

  • Writer: Ishika Gurnani
    Ishika Gurnani
  • Feb 26, 2020
  • 1 min read

1. Doubly Linked List

In Doubly Linked List each node apart from storing data has two links/two connection. The first link points to the previous node in the list and the second link points to the next node in the list. The first node of the list has its previous link pointing to NULL and the last node of the list has its next node pointing to NULL.

With just one pointer, we can look at the current node, the next node, and the previous node at the same time with just one variable of pointer used. At the same time it takes extra memory for pointer for the previous node. In Singly Linked List we just need 8 bytes but in Doubly Linked List here we are using 12 bytes.

2. Circular Single Linked List

In Singly Linked List we start from the first node. If we are in any node in the middle we cannot go back to the previous node from the node you are at. In Circular Single Linked List if we point the NULL to the first node we can make it happen.

3. Circular Doubly Linked List

This is similar with the previous one, the last node is connected with the first node and the first node is also connected with the last node.

 
 
 

Comments


Proudly created with Wix.com

bottom of page