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 |
Describe the merge sort principle and what will be its time complexity?
Can we override compareto method for enumerations?
Which is faster array or linked list?
What is time complexity of binary search?
what are the applications of Linked Lists?
Define hash function?
Which data structure is needed to convert infix notations to post fix notations?
Why linked lists are better than arrays?
List the differences between comparable and comparator interface?
What is dynamic data structure?
Write an algorithm to show various operations on ordered list and arrays
Differentiate between arraylist and vector.