What is Linked-List ?

( tap to know )

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

  • The linked list is a dynamic data structure so it can grow and shrink at runtime by allocating and deallocating memory.

  • Insertion and deletion of nodes are really easier.

  • No Memory Wastage.

  • A Real World Example :

  • For Dynamic memory allocation, We use linked list of free blocks.

  • Maintaining directory of names.

Linked-List may Look Like This :

SLLArt
Enter Values To Add Or Enter Index Of The Value To Remove From List, Hover To See The Memory Address Of The Element, The Below Visualization Visualized As In The Diagram In The Above Collapse.

What is Doubly-Linked-List ?

( tap to know )

Doubly linked list is a type of linked list in which each node apart from storing its data has two links. 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 similarly the last node of the list has its next node pointing to NULL.

A Real World Example :

  • Image viewer – Previous and next images are linked

  • Music Player – Songs in music player are linked to previous and next song.

Doubly-Linked-List may Look Like This :

SLLArt