What is the difference between an ArrayList and a LinkedList?
Vishalini.R Answered question September 7, 2023
The items of an array list are internally stored in a dynamic array. To store its elements, LinkedList makes use of a Doubly Linked List. Because manipulating an array takes longer, ArrayList is slow. Because it is node-based and requires less bit shifting, LinkedList is faster.
Vishalini.R Answered question September 7, 2023
- ArrayList internally uses a dynamic array to store its elements.
- LinkedList uses Doubly Linked List to store its elements.
- ArrayList is slow as array manipulation is slower.
- LinkedList is faster being node based as not much bit shifting required.
Shathana. S.R. Answered question September 7, 2023