insert method
- K key,
- V value
Inserts a key-value pair. If the key already exists, its value is updated. Time complexity: O(log N).
Implementation
void insert(K key, V value) {
_container[key] = value;
}
Inserts a key-value pair. If the key already exists, its value is updated. Time complexity: O(log N).
void insert(K key, V value) {
_container[key] = value;
}