Sr No.
|
Array
|
Link List
|
1
|
An array is a
collection of similar data type
|
A link list a
collection of similar objects which may have array
|
2
|
Space allocation continuous
|
Space allocation random
|
3
|
Element of an array
is access through its index
|
|
4
|
Array is an example of static memory
allocation
|
Link list is an example of dynamic
memory allocation
|
5
|
Size of array cannot
change once it has declared
|
Size of link is
dynamic and increase or decrease run as requirement
|
6
|
When number of element store in array
less than its capacity then it lead memory wasted.
|
Because link list is dynamic So space allocated
as number of element.
|
7
|
Traversing (access
items) is random.
|
Traversing is sequential
|
8
|
Backward Traversing possible
|
Only one direction of traversing is possible
|
9
|
Address can be
mathematically calculated due to continuous space allocation
|
Address prediction
not possible due to random space allocation
|
10
|
Types of array are one dimension, two dimension and multi dimension
|
Types of Link list are Single, Double and circular
|
11
|
Element of array is
access through its name
|
Element of link list
access through pointer
|
Wednesday, 18 October 2017
Array vs Link List
A programmer and Founder of Girfa
IT Services, working from 2009.At Starting computer teaching was my full-time job but after 10 years of teaching I chose to programming as a full-time job and teaching become part-time. In real life, I am very lazy and I made it my coding style I always try to make a reusable component that’s my USP for programming which saves my time and extra working both.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment