answersLogoWhite

0

What are the disadvantageds of linked lists?

Updated: 8/20/2019
User Avatar

Wiki User

11y ago

Best Answer

Cons

  • All nodes in a linked list are sequential. To retrieve the Nth element, you must traverse N-1 nodes (for a singly linked list). In other words, O(N).
  • There are better structures that are faster - balanced binary search trees O(log N).

Side Remark:

But if you always do work on the first node or top node, a linked list will work quite well. But at that point, it's not called a linked list anymore. It would be called a stack or a queue.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

7y ago

We normally compare linked lists to arrays. An array offers the most compact storage with constant-time random-access. Inserting or extracting an element within the array means moving other elements which invalidates all iterators to those elements. As such, inserting or extracting is best done at the end of an array. Nevertheless, if we run out of unused elements, we must reallocate the entire array, which often means moving those elements to new memory.

Linked lists overcome the problems of inserting and extracting elements because elements do not need to move, so all iterators into the list remain valid. However, a linked list consumes more memory than an array (at least two words per element) and does not offer constant-time random-access. Moreover, traversing a list is slower than traversing an array because of the need to dereference nodes in a list.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the disadvantageds of linked lists?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What advantages of a sorted list over a linked list?

All lists are linked lists; there is no such thing as a separate "sorted list". There are algorithms that can sort a list, of course, but they all work on linked lists.


What is binary linked list?

There is no such thing. There are binary trees and linked lists.


How can we represent polynomials using linked lists?

30


Is there a c program to multiply two polynomials using linked lists?

yes


What is a MET?

The website linked below lists 49 different meanings for MET.


What is a linked list used for?

A linked list is used in computer science to store data as a series of related nodes. Linked lists are used as the basis for abstract data types when programming. The chief advantage of a linked list is that data can be added or removed from the list without having to reorganize the whole list. A drawback to linked lists can be that it is difficult to sort, organize, or recall specific information from the list.


What Linked list uses.type of memory allocation?

Linked lists use dynamic memory allocation (also called "heap memory allocation", as the linked list is stored in heap memory).


What are the applications of structures?

Data structures could be used to implement an efficient database. Linked lists for example will optimize insertion and deletion for ordered lists.


What are the applications data structure?

Data structures could be used to implement an efficient database. Linked lists for example will optimize insertion and deletion for ordered lists.


How do you solve josephus problem using circular linked list?

The Josephus problem is a problem to locate the place for the last survivour. It shows the power of the circular linked list over the singly linked lists.


Which culture practices female circumcision?

You can see the detailed answer on this linked page, which lists by countries, not cultures.


What kind of data is linked list useful for and what not very useful for?

A linked list is useful for data which will be changed very often. The linked nature of linked lists makes them ideal for inserting and removing elements, as it requires only changing one or two pointers.