#pragma once
#include "finder.h"
#include "word_list.h"
#include <unordered_map>
class Bucket {
private:
std::unordered_map<char, WordRefList> directory_;
public:
void insert(const WordList &word_list, size_t first_index, size_t last_index);
WordRefList find_prefix(std::string_view search_term) const;
};
class BucketFinder : public Finder {
std::vector<Bucket> buckets_;
BucketFinder(const WordList &word_list);
WordRefList find_prefix(std::string_view search_term) const override;