Less than 1 minute
Home > @hz-9/algorithm > Hashmap > remove
Hashmap.remove() method
Removes the key from the hash map.
在哈希表中删除该键。
Time complexity: O(1)
Space complexity: O(1)
Signature:
abstract remove(key: K): boolean;Parameters
Parameter | Type | Description |
|---|---|---|
key | K | The key object. |
Returns:
boolean
Whether the removal is successful.