// // Created by Brady Bodily on 10/20/19. // #include #include #include #include #include #include #include #include #ifndef HW5_WORDTREE_HPP #define HW5_WORDTREE_HPP class TreeNode { public: bool endOfWord; std::array, 26> children; TreeNode(); }; class WordTree { private: std::shared_ptr root; std::size_t m_size; public: WordTree(); std::size_t size(); void add(std::string word); bool find(std::string word); std::vector predict(std::string partial, std::uint8_t howMany); static std::shared_ptr readDictionary(std::string filename); }; #endif // HW5_WORDTREE_HPP