Implement Trie search with wildcard matching | Trexquant Interview Question