problemscpp
A collection of my answers to algorithm problems in c++.
|
#include <leetcode.h>
Public 成员函数 | |
MyHashMap () | |
initializes the object with an empty map. 更多... | |
int | get (int key) |
void | put (int key, int value) |
inserts a (key, value) pair into the HashMap. If the key already exists in the map, update the corresponding value. 更多... | |
void | remove (int key) |
removes the key and its corresponding value if the map contains the mapping for the key. 更多... | |
Private 属性 | |
array< list< pair< int, int > >, SZ > | arr |
静态 Private 属性 | |
static const unsigned | SZ = 1021 |
在文件 leetcode.h 第 2625 行定义.
leetcode::design_hashmap::MyHashMap::MyHashMap | ( | ) |
initializes the object with an empty map.
在文件 leetcode.cpp 第 7116 行定义.
int leetcode::design_hashmap::MyHashMap::get | ( | int | key | ) |
在文件 leetcode.cpp 第 7134 行定义.
void leetcode::design_hashmap::MyHashMap::put | ( | int | key, |
int | value | ||
) |
inserts a (key, value) pair into the HashMap. If the key already exists in the map, update the corresponding value.
在文件 leetcode.cpp 第 7123 行定义.
void leetcode::design_hashmap::MyHashMap::remove | ( | int | key | ) |
removes the key and its corresponding value if the map contains the mapping for the key.
在文件 leetcode.cpp 第 7144 行定义.
|
private |
在文件 leetcode.h 第 2627 行定义.
被这些函数引用 MyHashMap(), get(), put() , 以及 remove().
|
staticprivate |
在文件 leetcode.h 第 2626 行定义.
被这些函数引用 MyHashMap(), get(), put() , 以及 remove().