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 are the disadvantages of representing a stack or queue by a linked list?
What is difference between set and map?
What is the impact of signed numbers on the memory?
What is faster array or arraylist?
Is hashmap sorted?
Can hashmap have duplicate keys?
What is hash data type?
What is stable sort?
What is a b+ tree? Explain its uses.
Write an algorithm through which the inserting and deleting of elements can take place in circular queue?
Write a data structure for a queue.
Which is better merge sort or quick sort?
Is list a data type?
How can someone display singly linked list from first to last?
What are the advantages of linked list?