0

From this link:

The principal benefit is that the order of the linked items may be different from the order that the data items are stored in memory or on disk, allowing the list of items to be traversed in a different order.

Is anybody able to explain the concept quoted above in other words? I cannot quite grasp it.

Jeroen Vannevel
  • 43,651
  • 22
  • 107
  • 170
Indeed ItIs
  • 257
  • 3
  • 10
  • 10
    I dont believe that is quite the principal benefit. – DarthVader Oct 14 '13 at 18:25
  • 10
    It's nonsense, basically. Ignore it. The principal benefits is the constant time insertion and deletion, IMO. – Jon Skeet Oct 14 '13 at 18:25
  • 3
    Welcome to SO. StackOverflow is for questions relating directly to code you have written. It is generally not a tutorial site. Please read the [FAQ] and [Ask] for details. That said, that quote is meaningless and misleading. Ignore it. – Jim Garrison Oct 14 '13 at 18:26
  • 1
    I'd say the major advantage of a linkedlist is the way the nodes are structured and thus allow for easy adding and removing. But that's a different discussion. – Jeroen Vannevel Oct 14 '13 at 18:27
  • Couldn't we cite the possibility of size increase without need of reallocating previous elements (in contrast to `ArrayList`)? – Mauren Oct 14 '13 at 18:29
  • 1
    possible duplicate of [When to use LinkedList<> over ArrayList<>?](http://stackoverflow.com/questions/322715/when-to-use-linkedlist-over-arraylist) – Rohit Jain Oct 14 '13 at 18:29
  • This quote is nonsense, at least it is not the main benefit. – AlexWien Oct 14 '13 at 18:48

1 Answers1

0

Benefits of LinkedList:

1.In a linked list, insertions and deletions can be handled efficiently without fixing the size of the memory in advance. Much faster then other data structures ex linked list insertion speed is much faster then a arraylist.

2.An important advantage of linked lists over arrays is that the linked list uses exactly as much memory as it needs, and can be made to expand to fill all available memory locations if needed.

on other hand Linked list also come with some cost for example it has a worst traversal speed because of sequential order of searching.

Spark-Beginner
  • 1,334
  • 5
  • 17
  • 24