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
What is data structure and why we need them?
What is data type explain?
What is the difference between hashset and hashtable?
Write the stack overflow condition.
Is data structures and algorithms important?
Explain about map and their types?
How to get largest and smallest number in an array?
Define a tree?
Define internal nodes?
Can treemap have null values?
How many parts are there in a declaration statement?
What do you mean by hash table?
What is the difference between Array and LinkedList?
Why is hashmap faster?
What is a hash index?