上次编辑到这里,代码来自缓存 点击恢复默认模板
class Trie {
public:
Trie() {
}
void insert(string word) {
}
int countWordsEqualTo(string word) {
}
int countWordsStartingWith(string prefix) {
}
void erase(string word) {
}
};
/**
* Your Trie object will be instantiated and called as such:
* Trie* obj = new Trie();
* obj->insert(word);
* int param_2 = obj->countWordsEqualTo(word);
* int param_3 = obj->countWordsStartingWith(prefix);
* obj->erase(word);
*/