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

What is a weighted graph?

0 Answers  


A lot of data structures related programs related to only trees and graphs, like the diameter of a tree, removing the loops in a graph etc.

0 Answers   Motorola,


What is Doubly link list?

0 Answers   TCS,


Where is binary tree used?

0 Answers  


Can we insert null in set?

0 Answers  


What does the term sorting refer to?

0 Answers  


List the types of tree.

0 Answers  


Which sorting algorithm is used in arrays sort?

0 Answers  


What is binary tree and its types?

0 Answers  


Explain what are the types of collision resolution techniques and the methods used in each of the type?

0 Answers  


Explain the Queue

0 Answers   Tech Mahindra,


How do you find the time complexity of a bubble sort?

0 Answers  


Categories