Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Implementation of Trie data structure using HashMap for different characters and method for predicting words based on prefix. More...
#include <cassert>
#include <iostream>
#include <memory>
#include <stack>
#include <unordered_map>
#include <vector>
Classes | |
class | data_structures::trie_using_hashmap::Trie |
Trie class, implementation of trie using hashmap in each trie node for all the characters of char16_t(UTF-16)type with methods to insert, delete, search, start with and to recommend words based on a given prefix. More... | |
struct | data_structures::trie_using_hashmap::Trie::Node |
struct representing a trie node. More... | |
Namespaces | |
namespace | data_structures |
for IO operations | |
namespace | trie_using_hashmap |
Functions for Trie data structure using hashmap implementation. | |
Functions | |
static void | test () |
Self-test implementations. | |
int | main () |
Main function. | |
Implementation of Trie data structure using HashMap for different characters and method for predicting words based on prefix.
The Trie data structure is implemented using unordered map to use memory optimally, predict_words method is developed to recommend words based on a given prefix along with other methods insert, delete, search, startwith in trie.
int main | ( | void | ) |
|
static |
Self-test implementations.