problemscpp
A collection of my answers to algorithm problems in c++.
|
#include <leetcode.h>
Public 成员函数 | |
AllOne () | |
Initializes the object of the data structure. 更多... | |
void | dec (const string &key) |
Decrements the count of the string key by 1. If the count of key is 0 after the decrement, remove it from the data structure. It is guaranteed that key exists in the data structure before the decrement. 更多... | |
string | getMaxKey () |
Returns one of the keys with the maximal count. 更多... | |
string | getMinKey () |
Returns one of the keys with the minimum count. 更多... | |
void | inc (const string &key) |
Increments the count of the string key by 1. If key does not exist in the data structure, insert it with count 1. 更多... | |
Private 属性 | |
map< int, unordered_set< string > > | count_str |
int | max = 0 |
int | min = 50000 |
unordered_map< string, int > | str_count |
在文件 leetcode.h 第 1748 行定义.
leetcode::all_oone_data_structure::AllOne::AllOne | ( | ) |
Initializes the object of the data structure.
在文件 leetcode.cpp 第 4564 行定义.
void leetcode::all_oone_data_structure::AllOne::dec | ( | const string & | key | ) |
string leetcode::all_oone_data_structure::AllOne::getMaxKey | ( | ) |
Returns one of the keys with the maximal count.
在文件 leetcode.cpp 第 4606 行定义.
string leetcode::all_oone_data_structure::AllOne::getMinKey | ( | ) |
Returns one of the keys with the minimum count.
在文件 leetcode.cpp 第 4613 行定义.
void leetcode::all_oone_data_structure::AllOne::inc | ( | const string & | key | ) |
|
private |
在文件 leetcode.h 第 1752 行定义.
被这些函数引用 AllOne(), dec(), getMaxKey(), getMinKey() , 以及 inc().
|
private |
在文件 leetcode.h 第 1749 行定义.
被这些函数引用 dec(), getMaxKey() , 以及 inc().
|
private |
在文件 leetcode.h 第 1750 行定义.
被这些函数引用 dec(), getMinKey() , 以及 inc().
|
private |
在文件 leetcode.h 第 1751 行定义.
被这些函数引用 AllOne(), dec(), getMaxKey(), getMinKey() , 以及 inc().