Tuesday, January 23, 2018

Advantages and disadvantages of linked list data structure

Advantages and disadvantages of linked list data structure, What are the advantages of linked list, What are the disadvantages of linked list


Advantages of using linked list


  • Not necessary to specify the number of elements in a linked list during its declaration. 
    • Linked list is not a static data structure like array where you need to specify the size/amount of memory you need beforehand.
  • The size of linked list can grow and shrink (increased or decreased) in size depending upon the insertion and deletion that occurs in the list during run time.
    • Linked list is dynamic data structure.
  • Insertions and deletions at any place in a list can be handled easily and efficiently.
  • A linked list does not waste any memory space.  
    • When you don’t need any elements then you can delete them and free the memory space occupied by them. You can easily de-allocate the memory space.

Disadvantages of using linked list

  • Searching a particular element in a list is difficult and time consuming. 
    • We have to start at the head node and traverse the linked list to find an element.
  • A linked list will use more storage space than an array to store the same number of elements. Because you need to store address of next node in the list along with data elements.

***************

Go to Data structures home page

Go to Programs for implementing data structures page


 




Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery