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 |
How many types of search algorithms are there?
What is a cycle or a circuit?
What does enum do?
Can sets contain duplicates?
Why do we need sorting algorithms?
what is the difference between dynamic as well as non - dynamic data structures.
What's the difference between an array and vector?
What is binary tree?
Write the programs for Linked List (Insertion and Deletion) operations
9 Answers College School Exams Tests, Persistent, TCS,
How do you find the index of an element in an arraylist?
Is merge sort better than quick?
What are the advantages of stack?