why it is difficult to store linked list as an array?
Answer Posted / 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 View All Answers
How many sorting techniques are there?
What is dynamic array how is it created?
What is an acyclic graph?
Is array part of collection framework?
What is data structure and why we need it?
Write the procedure to convert general tree to binary tree?
Define a right-skewed binary tree?
In what scenario, binary search can be used?
Explain pre-order and in-order tree traversal.
Does arraylist allow null values?
How do you declare A pointer to array of three chars
What are the applications of b-tree?
What does arraylist remove return?
What is data and its type?
What is stack explain with diagram?