Finds Longest Prefix & Uses Trie Data Structure