Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Name an advantage of array over linked list?

Answer Posted / sumeet choudhury

Arrays have random access and less overheads compared to
Linked list have sequential access only with too much
overheads and no cache memory support.
On the other hand, arrays allow random access, while linked
lists allow only sequential access to elements. Singly-
linked lists, in fact, can only be traversed in one
direction. This makes linked lists unsuitable for
applications where it's useful to look up an element by its
index quickly, such as heapsort. Sequential access on
arrays is also faster than on linked lists on many machines
due to locality of reference and data caches. Linked lists
receive almost no benefit from the cache.

Another disadvantage of linked lists is the extra storage
needed for references, which often makes them impractical
for lists of small data items such as characters or boolean
values. It can also be slow, and with a naïve allocator,
wasteful, to allocate memory separately for each new
element, a problem generally solved using memory pools.

Is This Answer Correct ?    64 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain polymorphism?

1113


Why is encapsulation used?

994


How to call a non virtual function in the derived class by using base class pointer

6565


Why is polymorphism important in oop?

1086


How do you answer polymorphism?

1063


What is encapsulation and abstraction? How are they implemented in C++?

1140


Why is polymorphism used?

1041


Can we create object of interface?

1135


write a program to find 2 power of a 5digit number with out using big int and exponent ?

2387


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

3229


Are polymorphisms mutations?

1164


What is object in oop?

1120


What is abstraction in oops?

1048


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2153


What is object-oriented programming? Webopedia definition

1265