Generating the permutations from a number of Characters

Posted by adam08 on Stack Overflow See other posts from Stack Overflow or by adam08
Published on 2010-05-04T14:41:29Z Indexed on 2010/05/04 15:18 UTC
Read the original article Hit count: 170

Filed under:
|
|

I'm working on a predictive text solution and have all the words being retrieved from a Trie based on input for a certain string of characters, i.e. "at" will give all words formed with "at" as a prefix. The problem that I have now, is that we are also supposed to return all other possibilities from pressing these 2 buttons, Button 2 and button 8 on the mobile phone, which would also give words formed with, "au, av, bt, bu, bv, ct, cu, cv" (most of which won't have any actual words.

Can anyone suggest a solution and how I would go about doing this for calculating the different permutations? (at the moment, I'm prompting the user to enter the prefix (not using a GUI right now)

© Stack Overflow or respective owner

Related posts about java

Related posts about permutation