We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Data Structures
- Trie
- Contacts
- Discussions
Contacts
Contacts
Sort by
recency
|
330 Discussions
|
Please Login in order to post a comment
};
class Trie{ TrieNode *root;
};
vector contacts(vector> queries) { vector result; Trie *trie = new Trie();
}
This is my solution, which rispects the time limit too, and w/o a tree structure.
Here my solution. The Fast version of the find matches function passes the time limit too. Nice problem.
Tip for C++ Programmers: You don't need a 26Tree, a HashMap (an array with 26 vectors) is the easiest way!