| 16 | class Trie { |
| 17 | Node* root; |
| 18 | Node* getNode(string &s){ |
| 19 | Node* curr = root; |
| 20 | for(auto &ch:s){ |
| 21 | if(curr -> child[ch - 97] == NULL) |
| 22 | return NULL; |
| 23 | curr = curr -> child[ch - 97]; |
| 24 | } |
| 25 | |
| 26 | return curr; |
| 27 | } |
| 28 | public: |
| 29 | Trie() { |
| 30 | root = new Node('\0'); |
nothing calls this directly
no outgoing calls
no test coverage detected