cloud-sat/simplify/utils/hashmap.hpp
2023-03-30 09:26:46 +00: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