Java Collections Framework
Java With DSA — One-Page Study Document
ArrayList
Dynamic array with O(1) average indexed access and amortized O(1) append. Insertions/removals in the middle are O(n).
HashMap
Hash-based key/value structure with expected O(1) get/put. Correct equals() and hashCode() implementations are essential.
HashSet
Stores unique elements using hashing. Expected O(1) add, contains and remove.
TreeMap / TreeSet
Sorted map/set implementations based on a balanced tree. Core operations are O(log n).
LinkedHashMap / LinkedHashSet
Preserve predictable encounter order. LinkedHashMap can also support access-order behavior useful for cache designs.
Queue / Deque
ArrayDeque is generally preferred over the legacy Stack class for stack or double-ended queue operations. PriorityQueue provides
heap-based priority ordering.
Concurrency
ConcurrentHashMap supports concurrent access. CopyOnWriteArrayList is useful when reads greatly outnumber writes.