19.0k views
3 votes
Assume an ArrayList and a Linked List each contain 10,000 items. Which operation is performed fastest

User Annonymous
by
5.3k points

1 Answer

1 vote

Answer:

ArrayList.get(0,item)

Step-by-step explanation:

Checking the time of execution of the different operation depends on the machine used and the algorithm written. The worst-case scenario should be used for this analysis.

The 'get()' method of the array list is faster than the get, add and remove() method of the linked list.

User Renno
by
5.5k points