Multiple choice technology programming languages

A programmer has an algorithm that requires a java.util.List that provides an efficient implementation of add(0,object), but does NOT need to support quick random access. What supports these requirements?

  1. java.util.Queue

  2. java.util.ArrayList

  3. java.util.LinearList

  4. java.util.LinkedList

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

java.util.LinkedList implements the List interface and stores elements in a doubly-linked list, allowing O(1) time complexity when adding elements to the beginning via add(0, object). However, it does not support quick random access (O(N)), meeting all requirements. ArrayList has O(N) insertion at index 0.