title: Trie for Unicode character set
body: <p>I have to match an input string against a set of prefixes. The match should be the best possible, such that if there are both <code>abcd*</code> and <code>abcde*</code>, then <code>abcdef</code> should match <code>abcde*</code>. I am using Trie for this. The problem is the character in the input and in the set of prefixes can be any Unicode character. So, the children array that we have in a simple trie won't be possible(won't be sufficiently efficient, atleast, as the array size will be very large). Using map instead of array would still be inefficient. How should I go about tackling this?</p>