Tuesday 25 June 2013

differences between Array and Linked list? [with simple explanation ]

topics
Array
Linked list

1.continuity
Array has continuous memory.
Linked list may or may not be continuous. It’s not really necessary for any linked list to fulfill continuity condition.

2.insertion/
deletion
Quite difficult.
Pretty much easier. Easy insertion and deletion is sort of the main base on why linked list concept was built.

3.space wastage
Spaces get to waste quite often.
There actually no chance for it.


4.expensity
Comparatively expensive.
Less expensive.

5.size accuracy
Size in array is always fixed.
Not fixed. (unless anything explicitly announced.)

6.extra memory requirement
Extra memory doesn’t really needed.
Linked list stores bit extra memory due to the pointer that comes along at the end of its’ nodes.

7.space expansion
Can’t be extended or reduced.
Linked list is quite flexible in this case.

8.access timing
Same amount of time takes to access each element.


Different amount of time takes to access each element.

9.accessing point
Directly reachable to the exact element.
Have to go through all the nodes come on the way to go the certain node’s information.

10.movement requirement
Needs movement of elements for insertion and deletion.

No needed.
11. space requirement
Requires less space as only the information shall be stored.
Comparatively takes more space as the pointers are stored along with every information.

No comments:

Post a Comment