Implementation in CMU 15-445

  • Class Trie with a shared_ptr pointing to TrieNode
  • Class TrieNode
    • Contains children_, a map from char to shared_ptr pointing to other TrieNode
    • Class TrieNodeWithValue inherit from TrieNode act as a left node (or terminal node)
      • The value of a key is stored in the node representing the last char of the key.

HAMT