Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int count(int i, Trie *head, std::string &key)
- {
- if(i == key.size()) return 0;
- if(head->is_leaf || head->nodes > 1) return 1 + count(i+1, head->character[key[i] - 97],key);
- else return count(i+1, head->character[key[i] - 97],key);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement