Ad Code

6/recent/ticker-posts

Linked List | Data Structure

What is Linked List?  

Lets understand through an example, lets say we maintain list i memory. There two ways to store a list in memory which are using arrays and the other one is the using Linked list. But the array have some limitations and also some disadvantages. To overcome those disadvantages we have to use Linked List.

Linked list contains our data and address.
Types 
1. Single Linked list :-Navigation is forward only
2.Doubly linked list :- forward and backward navigation
3. Circular linked list :- Last element is linked with first element


Before moving towards the Single linked list lets first understand what is Node. the node contains the actual data and the address of the next node in the list . Due to this we can connect one node to the next node by using address and form new list.

Node


Single linked list

It is the list made up of nodes that consists of two parts as we seen earlier . For crating the node of the single linked list we use the self referential structure. 

example of linked list,

Single linked list

Post a Comment

0 Comments

Ad Code