Implement T9 Dictionary using Trie?
问题 I have to implement the T9 Dictionary . Essentially, when I am pressing any of the 9 keys, it should show me the top 5 words that can be started with that combination of keys. If I type '46', it can give 'hotel' or 'good' depending on whether I intended 'g' or 'h' when I pressed 4. The priority is based on which words are relatively popular - you can use, say, the first 5000 words from the top 100 000 words. The code I am doing is: Import import java.io.BufferedReader; import java.io.File;