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?

15th Dec 2016, 9:17 AM
Hrishikesh Bawane
Hrishikesh Bawane - avatar
1 Antwort
+ 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
15th Dec 2016, 9:59 AM
Manikanta Nallamalli (Mittu)
Manikanta Nallamalli (Mittu) - avatar