1/12
Flashcards for Java Collections and Data Structures
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
List
Ordered collection, allows duplicates
Set
No duplicates
Map
Stores key -> value pairs
Stack
LIFO (Last In, First Out)
Queue
FIFO (First In, First Out)
HashMap put()
Method to add a key-value pair to a HashMap
HashMap get()
Method to retrieve a value from a HashMap using its key
HashSet
Ignores duplicate elements
TreeMap
Keeps keys sorted
PriorityQueue
Orders elements with the smallest element first
Iterator
Traverse & modify collections
Balanced parentheses strategy
Use Stack to match opening and closing parentheses
Backtracking maze order
West -> South -> East -> North