solve hw-9

This commit is contained in:
JamesFlare1212
2025-04-15 22:08:11 -04:00
parent 9ec5d3d32c
commit a109046498
17 changed files with 1498 additions and 7 deletions

View File

@@ -0,0 +1,18 @@
#pragma once
#include <string>
#include <functional>
struct StringPtrHash {
size_t operator()(const std::string* s) const {
return std::hash<std::string>()(*s);
}
};
struct StringPtrEqual {
bool operator()(const std::string* a, const std::string* b) const {
if (a == b) return true;
if (!a || !b) return false;
return *a == *b;
}
};