DS - Representation of linked list in memory.

Representation of linked list in memory.

Linked list is more advanced as compared to array.
But there are many differences such as there is no sequential memory allocation and other major difference is that there is a use of pointers i.e.,link.
Linked lisst is represented in the below diagram.

As we can see in the above diagram, it is a linked list which contain elements, which are linked to each other with the help of pointers.
Pointera are used to link previous and next element.
All these elements are stored at different and random locations.
Thats why it is very important to know the start of linked list.
For this purpose start ptr is used, which points to the first element/ starting element of the linked list.

Comments

Popular posts from this blog

Theory part introduction

Data structure - Sorting methodes