Advantages of Linked List over an Array

State the advantages of link list over array.

1 Answer

Advantages of Linked List over an Array

  • Linked lists are dynamic data structures, which means they can grow or shrink during the execution of a program.

  • There is no need to define an initial size for a Linked list.

  • There is no need to specify how many nodes are required.

  • Therefore, linked lists have efficient memory utilization and no wastage of memory.

  • In Linked list memory is not preallocated.

  • Memory is allocated whenever it is required and it is de-allocated or removed when it is no longer needed.

  • The main advantage of a linked list over an array is Insertion and Deletion operations are easier and more efficient.

  • Linked lists provide flexibility in inserting a data item at a specified position and deletion of the data item from the given position.

  • No need for reallocation or reorganization of the entire structure of the list because the data items are not stored contiguously in memory or on disk.

  • This will also lead to a reduction in the data access time in the linked list.

  • But, doing this in array at run-time is a very much expensive operation.

  • Because the arrays are a type of static data structure, therefore, the size remains fixed and we would need to allocate all the storage at the starting.

  • Many complex applications can be easily carried out with linked lists.

  • Some of them are as follows:

    • Hash Table Implementation
    • Polynomial Representation
    • Adjacency List Implementation for Graphs
    • Abstract Data Type Implementation
    • S-expressions
    • Implement Associative Arrays
    • Stack and Queue Implementation
Please log in to add an answer.