Choose a collection by the operations the job needs. List preserves indexed order and duplicates. ArrayList has constant-time indexed reads, amortized constant-time append, and linear middle insertion or removal. LinkedList walks nodes for indexed access, so repeated get(i) can make a traversal quadratic. Set represents uniqueness, while Map associates each key with one value.
HashMap and HashSet offer expected constant-time basic lookup when hashes disperse well, not a universal worst-case promise. HashMap doesn't promise encounter order. LinkedHashMap and LinkedHashSet preserve it; TreeMap and TreeSet use sorted keys with logarithmic basic operations. Queue describes service order, and Deque adds both ends. ArrayDeque end operations are amortized constant time; contains and arbitrary removal are linear. You will distinguish value removal from index removal, preserve report order and combine FIFO service with LIFO undo.