A simple, practical reference for Java Collections, including:
- All major data structures (List, Set, Map, Queue, Deque, Stack, PriorityQueue)
- Common methods, time complexities, and code examples
- Utility functions (Arrays, Collections, StringBuilder)
- Coding interview patterns and tips
- Handy best practices and gotchas
Section | Description | Link |
---|---|---|
Lists | ArrayList, LinkedList, methods, time complexity | Lists |
Sets | HashSet, LinkedHashSet, TreeSet | Sets |
Queues | Queue, LinkedList, ArrayDeque | Queues |
Deques | Double-ended queue | Deque |
Stacks | Stack, ArrayDeque | Stacks |
Maps | HashMap, TreeMap, LinkedHashMap | Maps |
PriorityQueue | Min-heap, Max-heap | PriorityQueue |
Utilities | Arrays, Collections, StringBuilder | Utilities |
Comparator & Comparable | Sorting custom objects | Comparator & Comparable |
Coding Patterns | Interview templates | Coding Patterns |
Interview Tips | General advice | Interview Tips |
Anyone who wants a quick, clear, and practical reference for Java collections—students, interviewees, and working developers.
Feel free to suggest improvements or open a pull request!
Happy coding!