TrieNode *obj = newTrieNode(); for (auto key : keys) obj->Insert(key);
std::string words[] = {"the","these","thire","their","th","thaw"}; char output[][32] = {"Not present in trie", "Present in trie"};
for (auto word : words) cout << word << " --- " << output[obj->Search(word)] << endl; return0; }
// Trie.cpp output // the --- Present in trie // these --- Not present in trie // thire --- Not present in trie // their --- Present in trie // th --- Not present in trie // thaw --- Not present in trie