GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  DRDO

 Print  |  
Question:  what ia an array ? advantage linked-list over arry?



August 08, 2008 06:59:18 #7
 shmlbbt   Member Since: June 2008    Total Comments: 2 

RE: what ia an array ? advantage linked-list over arry?
 
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.
     

 

Back To Question