forked from BYU-CS235-F18/Lab9-Hashmap
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathHashmap.h
More file actions
51 lines (38 loc) · 1018 Bytes
/
Hashmap.h
File metadata and controls
51 lines (38 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include <string>
#include "HashmapInterface.h"
class Hashmap : public HashmapInterface {
private:
// put any private data members or methods here
public:
Hashmap() {
// implement your constructor here
}
~Hashmap() override {
// implement your destructor here
}
void insert(std::string key, int value) override {
// implement insert here
}
bool contains(const std::string &key) const override {
// implement contains here
}
int get(const std::string &key) const override {
// implement get here
}
int &operator[](const std::string& key) override {
// implement operator[] here
}
bool remove(const std::string &key) override {
// implement remove here
}
void clear() override {
// implement clear here
}
int numBuckets() const override {
// implement numBuckets here
}
int size() const override {
// implement size here
}
};