Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
Loading...
Searching...
No Matches
trie_modern.cpp File Reference

A basic implementation of trie class to store only lower-case strings. More...

#include <iostream>
#include <memory>
#include <string>
Include dependency graph for trie_modern.cpp:

Classes

class  Trie
 
struct  Trie::TrieNode
 

Functions

int main ()
 

Detailed Description

A basic implementation of trie class to store only lower-case strings.

Author
Anmol3299

Function Documentation

◆ main()

int main ( void )

Main function

160 {
161 Trie trie;
162 trie.insert("hel");
163 trie.insert("hello");
164 trie.removeWord("hel");
165 std::cout << trie.search("hello") << '\n';
166
167 return 0;
168}
Definition trie_modern.cpp:16
bool search(const std::string &word)
Definition trie_modern.cpp:132
void insert(const std::string &word)
Definition trie_modern.cpp:109
Here is the call graph for this function: