KUMAR SHIVAM

Define Linked List. Advantages and disadvantages of Linked List ? 

Data Structures and Algorithms

Answer in Short

A linked list is a sequence of data structures, which are connected together via links ... Advantage are a dynamic in nature which allocates the memory when required. Insertion and deletion operations can be easily implemented. Stacks and queues

Explanation

969    0

==> Linked List--

  • List is a linear collection of data items.
  • s. List can be implemented using arrays and linked lists.
  • s. In arrays there is linear relationship between the data elements which is evident from the physical relationship of data in the memory.
  • The address of any element in the array can easily be computed but, it is very difficult to insert and delete any element in an array
  • Usually, a large block of memory is occupied by an array which may not be in use and it is difficult to increase the size of an array, if required.
  • 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.

==> Advantages of Linked Lists--

  1. They are a dynamic in nature which allocates the memory when required.
  2.  Insertion and deletion operations can be easily implemented.
  3.  Stacks and queues can be easily executed.
  4.  Linked List reduces the access time. 

==> Disadvantages of Linked Lists--

  1. The memory is wasted as pointers require extra memory for storage.
  2.  No element can be accessed randomly; it has to access each node sequentially.
  3.  Reverse Traversing is difficult in single linked list. 


Share:   

More Questions from Data Structures and Algorithms Module 3