Given an array of strings queries and a string pattern, return a boolean array answer where answer[i] is true if queries[i] matches pattern, and false otherwise.
A query word queries[i] matches pattern if you can insert lowercase English letters pattern so that it equals the query. You may insert each character at any position and you may not insert any characters.
classTrie { unordered_map<char, Trie*> next; int eof; boolisNEOF(char c){ return ('A' <= c and c <= 'Z') or ('a' <= c and c <= 'z'); } public: Trie(): eof(-1){}