147k views
3 votes
Why should a linked list node be separate from the element stored on the list?

User Neri
by
7.5k points

1 Answer

2 votes

Step-by-step explanation:

A linked list node should be separated from the element stored in the list because it is not reasonable to assume that the each object that we may want insert in the collection can be architectured to cooperate with the collection implementation.

Also the details of the implementation are to kept distinct from the user of that collection , including the elements that the user wants to add to his collection.

User Met
by
8.8k points