1/32
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
init a HashMap mapping strings to integers with the variable name 'map'
Map<String, Integer> map = new HashMap<>();
method to add an entry to a HashMap
put(key, item)
method to retrieve an item from a HashMap
get(key)
method to retrieve an item from a HashMap with a default value
getOrDefault(key, default)
method to check if a key exists in a HashMap
containsKey(key)
method to remove an item from a HashMap
remove(key)
method to check the number of entries in a HashMap
size()
init a list containing integers named 'list' that is empty
List<Integer> list = new ArrayList<>();
method to append an item to a list
add(item)
method to insert an item to a list at an index
add(index, item)
method to index a List
get(index)
Method to update an index of a List
set(index, item)
method to remove an index from a List
remove(index)
method to sort a List
Collections.sort(list)
method to reverse a List
Collections.reverse(list)
init a Hashset containing Integers named 'set'
Set
method to add an item to a HashSet
add(item)
method to check if an item exists in a HashSet
contains(item)
method to remove an item from a HashSet
remove(item)
method to do a union on a HashSet
addAll(other)
method to do a intersection on a HashSet
retainAll(other)
init a deque named 'dq' containing Integers
Deque
method to enqueue into a Deque
offerLast(item)
method to dequeue from a Deque
pollFirst()
method to peek the first item in a Deque
peekFirst()
method to push an item onto a Deque
push(item)
method to pop an item from a Deque
pop()
method to peek the top of a Deque
peek()
init a min heap named 'minHeap' that contains integers
PriorityQueue
method to add an item to a Heap
add(item)
method to pop the next item from a Heap
poll()
method to look at the next item in a Heap
peek()
init a maxHeap named 'maxHeap' containing integers
PriorityQueue