0
How to know whether to use Array or Linked List?
I am a beginner in programming, started some 5 months back. I learned the concepts n differences between arrays n linked lists but I don't understand when to use the appropriate data type?
1 Réponse
+ 1
one primary difference between linked list and array is ...array can be used for basic entity purpose to compute on single attribute values merely..Example: sorting of elements (integers) ....where as linked list can be implemented for multiple attribute nodes. Example: k-ary tree...its very difficult to implement using array and hence it would be better to implement with linked lists