problemscpp
A collection of my answers to algorithm problems in c++.
|
#include <leetcode.h>
Public 成员函数 | |
TimeMap ()=default | |
初始化数据结构对象 更多... | |
string | get (const string &key, int timestamp) |
返回先前调用 set(key, value, timestamp_prev) 所存储的值,其中 timestamp_prev <= timestamp 。 更多... | |
void | set (const string &key, string value, int timestamp) |
存储键 key、值 value,以及给定的时间戳 timestamp。 更多... | |
Private 属性 | |
unordered_map< string, map< int, string, greater< int > > > | um |
在文件 leetcode.h 第 3301 行定义.
|
default |
初始化数据结构对象
string leetcode::time_based_key_value_store::TimeMap::get | ( | const string & | key, |
int | timestamp | ||
) |
返回先前调用 set(key, value, timestamp_prev) 所存储的值,其中 timestamp_prev <= timestamp 。
在文件 leetcode.cpp 第 9419 行定义.
引用了 um.
void leetcode::time_based_key_value_store::TimeMap::set | ( | const string & | key, |
string | value, | ||
int | timestamp | ||
) |
|
private |
在文件 leetcode.h 第 3302 行定义.