Get Started
996

Q: How do you decide when to use ArrayList and When to use LinkedList?

  • Show Answer
  • Workspace

Answer :
Explanation :

If you need to support random access, without inserting or removing elements from any place other than the end, then ArrayList offers the optimal collection. If, however, you need to frequently add and remove elements from the middle of the list and only access the list elements sequentially, then LinkedList offers the better implementation.

The Most Comprehensive Exam Preparation Platform

Get the Examsbook Prep App Today