[C++] std::set/map
- 2022.11.28
- C++
Hash table in C++
初始化 |
—
|
插入元素 |
s.insert(x); — m.insert({k, v}); |
刪除元素 | a.erase(x); |
查詢某元素/key是否存在 | a.count(x); // 存在則回傳1, 不存在則回傳0 |
Last Updated on 2023/08/16 by A1go
Hash table in C++
初始化 |
—
|
插入元素 |
s.insert(x); — m.insert({k, v}); |
刪除元素 | a.erase(x); |
查詢某元素/key是否存在 | a.count(x); // 存在則回傳1, 不存在則回傳0 |
Last Updated on 2023/08/16 by A1go