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...


why it is difficult to store linked list as an array?



why it is difficult to store linked list as an array? ..

Answer / codex

Its not difficult if you need to copy items in linked list to an array you should traverse the list starting first element and copy each value you pass by to an array.

if you are asking why do we use a linked list rather than array then it's because an array needs to have a fixed size but in a linked list you can add as much items as you can.but If you really need to use an array you can use an arraylist with resize feature.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

Describe the merge sort principle and what will be its time complexity?

1 Answers   Wipro,


Can we override compareto method for enumerations?

0 Answers  


Which is faster array or linked list?

0 Answers  


What is time complexity of binary search?

0 Answers  


what are the applications of Linked Lists?

0 Answers  


Define hash function?

0 Answers  


Which data structure is needed to convert infix notations to post fix notations?

20 Answers   Fidelity, Infosys,


Why linked lists are better than arrays?

0 Answers  


List the differences between comparable and comparator interface?

0 Answers  


What is dynamic data structure?

1 Answers  


Write an algorithm to show various operations on ordered list and arrays

0 Answers  


Differentiate between arraylist and vector.

0 Answers  


Categories