Longest prefix matching – A Trie based solution in Java