cloud-sat/utils/hashmap.hpp
2022-08-30 15:42:35 +08:00

26 lines
374 B
C++

#ifndef _hashmap_hpp_INCLUDED
#define _hashmap_hpp_INCLUDED
typedef long long ll;
struct DataType{
ll key;
int val;
};
struct HashNode{
DataType data;
struct HashNode *next;
};
struct HashMap{
int size;
HashNode **table;
HashMap(int size = 10000007);
~HashMap();
int get(ll key, int vsign);
void erase(ll key);
void insert(ll key, int value);
};
#endif