Linked List

Linked List is a linear data structure and it is very common data structure which consists of group of nodes in a sequence which is divided in two parts. Each node consists of its own data and the address of the next node and forms a chain. Linked Lists are used to create trees and graphs.

Linked List Representation

screenshot_35

Advantages of linked list

  • Dynamic Data Structure: The size of linked list increase and decrease during program execution.

  • No memory wastage: In linked list memory will be allocated at the time of program execution so no memory wastage.

  • Easily insert and delete data: In linked list you can insert any data at specific position and also delete any data from specific position.

Dis-Advantages of linked list

  • Need more memory: For store data in linked list you need more memory space, you need memory space for both data and address part.

Applications of Linked Lists

  • Linked lists are used to implement stacks, queues, graphs, etc.

  • Linked lists let you insert elements at the beginning and end of the list.

  • In Linked Lists we don’t need to know the size in advance.

Types of Linked List

1.Simple Linked List

2.Doubly Linked List

3.Circular Linked List