Name some disadvantages of Linked Lists?

Technology CommunityCategory: Data StructuresName some disadvantages of Linked Lists?
VietMX Staff asked 3 years ago

Few disadvantages of linked lists are :

  • They use more memory than arrays because of the storage used by their pointers.
  • Difficulties arise in linked lists when it comes to reverse traversing. For instance, singly linked lists are cumbersome to navigate backwards and while doubly linked lists are somewhat easier to read, memory is wasted in allocating space for a back-pointer.
  • Nodes in a linked list must be read in order from the beginning as linked lists are inherently sequential access.
  • Random access has linear time.
  • Nodes are stored incontiguously (no or poor cache locality), greatly increasing the time required to access individual elements within the list, especially with a CPU cache.
  • If the link to list’s node is accidentally destroyed then the chances of data loss after the destruction point is huge. Data recovery is not possible.
  • Search is linear versus logarithmic for sorted arrays and binary search trees.
  • Different amount of time is required to access each element.
  • Not easy to sort the elements stored in the linear linked list.