Thursday 25 August 2011

Difference between Linked List and Arrays





1)    we can quickly insert and delete values (elements) in linked list.
2)    we can simply organize those pointers that are affected by the change in linked list.
3)    Linked list are very difficulty to sort.
4) random accessing is not possible:   Can not immediately locate the desires element, we need to traverse(visit) the whole list to reach that element means sequential searching only possible .

5)    Linked list are not constrained to be stored in adjacent locations.
6)    Basically 3 types are there :- singly,doubly,and circular.
7)    Linked list is a list whose order is given by links from one item to the next.





1)       Can not do so quickly as in linked list.
2)      Inserting and deleting items in an array involves shifting, its not simple.
3)      They are not difficulty to sort.
4)      Easy to locate the desired element, random accessing possible.
5)      The element of an array occupies contiguous memory locations.
6)      Basically two types are there :- one dimention, two dimention.
7)      An array is a group of related data items that share a common name.




Types of Linked List:
Doubly Linked List
Circular Linked List  

Node class members or node structures


No comments:

Post a Comment