feat: add quiz 2 counter.

This commit is contained in:
2025-05-19 21:26:47 +08:00
parent 651bc79d2e
commit a4624b477f
7 changed files with 92 additions and 0 deletions

15
counter/include/counter.h Normal file
View File

@@ -0,0 +1,15 @@
#include <string>
#include <unordered_map>
namespace counter
{
struct Counter
{
static std::unordered_map<std::string, long> count(const std::string& input);
static void countPair(std::unordered_map<std::string, long>& map, const std::string& input);
static void countTriple(std::unordered_map<std::string, long>& map, const std::string& input);
};
}