GeekInterview.com
Series: Subject: Topic:
Question: 6 of 6

What is an array? What is the advantage of linked-list over array?

Asked by: Interview Candidate | Asked on: Nov 25th, 2005
Showing Answers 1 - 9 of 9 Answers
Anjaki

Answered On : Feb 2nd, 2006

Array is a collection of similar entities like integers, float etc. Its syntax is int arr[] that  is, array is of int datatype. They store the variables in contiguous memory locations. The advantage of linked list lies in its flexibility in assigning memory locations. The element stored in linked list need not to be in contiguous memory locations.Hence,memory can be utilized efficiently.

  
Login to rate this answer.
kausik ray

Answered On : Mar 3rd, 2006

Array is a set of memory location in the user memory(RAM).adv. of linked list over array: 1. linked list is created by the dynamic memory alocation. Where as array is created by static memory allocation. So in linked list the memory space is properly utilised & in array the unused memory spaces are wasted.2. in linked list at any positon insertion,deletion of a node can be done. But in array insertion 7 deletion can be done on the end of an array.

  
Login to rate this answer.
vinnakota5279

Answered On : Mar 15th, 2006

View all answers by vinnakota5279

Technically, considering the antenna terminology an antenna array is collection of similar antennas oriented similarly to get greater directivity in desired direction.Therefore, an array can be defined as collection of memory locations.The advantage of linked list over array is in linked-list the information is not stored in random memory locations as in array so, there is no wastage of memory in an linked-list compared to array.Therefore,linked-list has advantage of good memory management over array.

  
Login to rate this answer.
laxman

Answered On : Jul 28th, 2006

In array we can insert or delete an element in the list , and run time memory allocation is not possible in the arrays,we can add memory and delete memory allocations.in arrays it is not possible to store large amount of data where it is possible withlinked list.

  
Login to rate this answer.
sunil kumar

Answered On : May 8th, 2007

Array is a collection of homogenious data elements stored in continuous memory locations.In array we have a direct access to any element but in linklist to access any element we have to begin from the start node.

Yes  1 User has rated as useful.
  
Login to rate this answer.
Bijoy kumar Baral

Answered On : May 17th, 2007

An Array is an collection of data elements of similar type.Arrays are fixed-length structures for storing multiple values of the same type. An array implicitly extends java.lang.Object so an array is an instance of Object. But arrays are directly supported language features.Linkedlist is the ordered collection of data elements not in similar types.Linked list implementation of the List interface,the LinkedList class provides uniformly named methods to get, remove and insert an element at the beginning and end of the list,Linked list implementation can't be synchronized

  
Login to rate this answer.
shmlbbt

Answered On : Aug 30th, 2008

View all answers by shmlbbt

If you want to insert or remove element from the end, use arraylist. But adding or removing an element from the middle is expensive because the reminder array should be copied one step backward or forward. But this is very easy in a linked list because just need to change the link. Getting an element from the array list is very easy, but from a linked list is difficult because you have to start searching from the first node and travers through each and every node.

Yes  1 User has rated as useful.
  
Login to rate this answer.

Array:- Array is an collection of similar data types.Advantage of link list:1) First in the Array is compile time address binding. It means it allocate memory space for an array at compile time. So we can not add more element than the size of array at run time. In array size is fixed so if we use memory less than size then space will be wasted. In another way Linked list is Run time address binding. In linked list there is no waste of memory. User can use memory as he needed. In another way linked list is collection of non-similar data types. So it can stores non-similar data.

Yes  1 User has rated as useful.
  
Login to rate this answer.
divyagopi95

Answered On : Aug 22nd, 2009

View all answers by divyagopi95

Array is a collection of same data type. In linked list there are two field, one is address and other is pointer. In array, elements are arranged in a specific order

Yes  1 User has rated as useful.
  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.