Implementation of Trie data structure for English alphabets in small characters.
More...
#include <array>
#include <cassert>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
Implementation of Trie data structure for English alphabets in small characters.
- Author
- @Arctic2333
-
Krishna Vedala
- Note
- the function ::data_structure::trie::deleteString might be erroneous
- See also
- trie_modern.cpp
◆ main()
Main function.
- Returns
- 0 on exit
◆ test()
Testing function.
- Returns
- void
183 assert(!root.search(
"hello", 0));
184 std::cout <<
"hello - " << root.search(
"hello", 0) <<
"\n";
186 assert(root.search(
"Hello", 0));
187 std::cout <<
"Hello - " << root.search(
"Hello", 0) <<
"\n";
189 assert(!root.search(
"Word", 0));
190 std::cout <<
"Word - " << root.search(
"Word", 0) <<
"\n";
192 assert(root.search(
"World", 0));
193 std::cout <<
"World - " << root.search(
"World", 0) <<
"\n";