Trie树

记住Trie树的基本数据结构就可以了。

 

https://discuss.leetcode.com/topic/15581/80ms-clear-c-code-with-detailed-explanations

 

class TrieNode {
public:
    bool isKey;
    TrieNode* children[26];
    TrieNode(): isKey(false) {
        memset(children, NULL, sizeof(TrieNode*) * 26); 
    }
};
posted @ 2017-03-09 18:35  blcblc  阅读(123)  评论(0编辑  收藏  举报