X Interview Question

The interviewer asked me to implement a trie and write a 'getWithPrefix' function with a wildcard letter '*'