what is the difference between arrays and linked list
Answers were Sorted based on User's Feedback
Answer / shweta
In array,memory is managed randomly...
but, in linked list memory is managed in a heap concept..
| Is This Answer Correct ? | 13 Yes | 6 No |
Answer / thanu
arrays: staticaly allocating memory
easy to traverse
memory wastage
linked list:runtime allocation
difficult to traverse
efficient usag of memory
| Is This Answer Correct ? | 8 Yes | 2 No |
Answer / jyoti
1.In case of array storing is easy and simple rather than
that of linked list because linked list need more space to
store same amount of data than amount of memory required by
array.
2.In case of linked list operations like
insertion,deletion,merging etc are easy than that of array.
3.Size of array is predefined but in case of linked list it
is defined at run time.
4.Array is randomly accessed but list is sequentially
accessed only.
5There is problem of memory wastage in case of array.
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / najirabanu
Array has fixed length but linked list is not have fixed
length if u store a number in array means it must have
memory space according to the number but in linked list not
neccessary memory space according to the number
In linked list one node that contain pointer,that denoted
as addrs of another node
In array should not contain addrs of another node
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / deenadhayalan.t
array is nothing but collection of similar data type.
list is a collection of different data type..
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / indiargukt
For fixed length linked lists are better rather than arrays.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / bhaskar diwakar
Linked list->1.insertion & Deletion is very easy compare to
Array.
2.only Sequential Searching Allow
3.Dynamic memory allocation
4.collection of non homogenous data
Array->use to both sequential & non sequential
searching(binary search)
2.collection of homogenous data
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / prabhjot singh
array is easy to understand bt linked list -very difficult .
| Is This Answer Correct ? | 15 Yes | 15 No |
Answer / vky
Some of the above mention answer is nice, i would like to add some more points
Array had certain disadvantages as data storage, in an unordered array, searching is slow ,whereas in ordered array insertion is slow,In both kind of array deletion is slow
but in the case of link list it becomes very simple, like if we have to insert a new number create a new object of list and change the pointing reference
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / manikandan.s
Array is a collection of similar data-items and stored in sequence order with fixed size of memory.
But lined list contains collection of node. Each node link between other node and pointer is used to identify the position. Node consists of element and address of next element.
| Is This Answer Correct ? | 0 Yes | 0 No |
wite a programme in c to linear search a data using flag and without using flags?
what is the difference between unix os and linux os
what is the use of bitfields & where do we use them?
without using arithmatic operator convert an intger variable x into x+1
What is the difference between %d and %i?
How can I write a function that takes a format string and a variable number of arguments?
Explain what are run-time errors?
Write a program in C to reverse a number by recursive function?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
how to find your architecture is LittleEndian or BigEndian?
write a program to swap two numbers without using temporary variable?
How can I trap or ignore keyboard interrupts like control-c?