MCPcopy Create free account
hub / github.com/ByteByteGoHq/coding-interview-patterns / TrieNode

Method TrieNode

cpp/Tries/design_a_trie.cpp:8–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6 std::unordered_map<char, TrieNode*> children;
7 bool isWord;
8 TrieNode() : isWord(false) {}
9 ~TrieNode() {
10 for (auto& pair : children) {
11 delete pair.second;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected