#pragma once #include "finder.h" #include "word_list.h" #include class Bucket { private: std::map groups_; public: Bucket() = default; void insert(const WordList &word_list, size_t first_index, size_t last_index); std::forward_list find_prefix(std::string_view search_term) const; }; class BucketFinder : public Finder { private: std::vector buckets_; public: BucketFinder(const WordList &word_list); std::forward_list find_prefix(std::string_view search_term) const override; };