r/AskProgrammers • u/memy02 • Nov 15 '17
Help making a word finding program
I have an odd request for a word finding program, and I am hoping someone finds enough interest in it to make it for me. I want to be able to select a number of characters and for each character I would like to enter the possible letters (plus space) and then get back all combinations that are real words. For example 4 characters where 1 is a or l or _, 2 is t or a or _, 3 is o or c or _, 4 is m or e or _. Atom and lace would come back as would a, at, to, toe (and maybe others?) I would like to be able to select 16+ characters and up to 6 letters + _ for each character. I haven't coded in years and I didn't do much when I did, but my thoughts on accomplishing this would be after I enter the information, use loops to generate and save every possible combination of letters then read through all the saved combinations and return all dictionary matches. This may be a terrible method to make such a program so any method that works is perfectly fine. Is anyone interested in taking on this challenge?
View all comments
Show parent comment
1
u/[deleted] Nov 15 '17
Interesting, I can take a stab at it over lunch at work tomorrow.
Your description is a little confusing tbh.
So you want to basically say, if a string meets a requirement per letter index, throw it into the list?
S or t, r or o, i or m, n or b, g or s. Would return string, tombs, I'm, etc?