Which list is usually better for fast random access by index?
Practice this question from Quiz: Collection Comparisons, with options and an explanation.
Question
Which list is usually better for fast random access by index?
Option A — Correct answer
ArrayList
ArrayList has O(1) indexed access because it is backed by an array.
Option B
LinkedList
Option C
Hashtable
Option D
PriorityQueue