What are the advantages of linked lists?
The biggest advantage of linked lists is that they can be
expanded in constant time without memory overhead.
For example when you make an array you must allocate memory for
a certain number of elements. If you want to add more elements to
the array than you allocated for you must create a new array and
copy the old array into the new array. This can take lots of time.
You can prevent this by allocating lots of space initially but then
you might allocate more than you need wasting memory.
With a linked list you can start with space for just one element
allocated. And add on new elements easily without the need to do
any copying and reallocating.