Diff b/w linked& array list | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Diff b/w linked& array list

6th Nov 2017, 4:44 PM
Shwetha
Shwetha - avatar
4 Answers
+ 8
https://www.sololearn.com/Discuss/839853/?ref=app
6th Nov 2017, 7:36 PM
David Akhihiero
David Akhihiero - avatar
0
Hey swetha .I'm Tamil, pondicherry
7th Nov 2017, 1:33 PM
Ragu Nandhan
Ragu Nandhan - avatar
0
➡ArrayList uses a dynamic resizable array. LinkedList uses doubly linked list data structure. ➡ArrayList is not efficient for manipulation because a lot of shifting is required. LinkedList is efficient for manipulation. ➡ArrayList is better to store and fetch data. LinkedList is better to manipulate data. ➡ArrayList allow random access, so you can grab any element in constant time. But adding or removing from anywhere but the end requires shifting all the latter elements over, either to make an opening or fill the gap. LinkedList allows for constant-time insertions or removals, but only sequential access of elements. In other words, you can walk the list forwards or backwards, but grabbing an element in the middle takes time proportional to the size of the list.
8th Nov 2017, 7:57 AM
Nitin Sonwane
Nitin Sonwane - avatar