Question: If you have to add or delete the elements at the beginning of a list, should you use ArrayList or LinkedList? If most of the
If you have to add or delete the elements at the beginning of a list, should you use ArrayList or LinkedList?
If most of the operations on a list involve retrieving an element at a given index, should you use ArrayList or LinkedList?
Please elaborate as much as possible on both. Segments of code as part of an explanation would also be greatly appreciated. Thanks.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
