Android Question Crossword Solver

cadcamman

Member
Licensed User
Longtime User
Hi All

I am trying to write a crossword solver, but i am new to programming and dont know how to handle entering unknown letters into the search string. any pointers you could give to point me in the right direction would be appreciated

Thanks
Cadcamman
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
Can you provide an example of what you mean by "entering unknown letters into the search string"? Do you mean if the user enters something that's not A-Z? Or do you mean if the user enters a wildcard character? Or are you wanting to use wildcards?
 
Upvote 0

cadcamman

Member
Licensed User
Longtime User
Can you provide an example of what you mean by "entering unknown letters into the search string"? Do you mean if the user enters something that's not A-Z? Or do you mean if the user enters a wildcard character? Or are you wanting to use wildcards?


Thanks for the reply
Yes i want to use a question mark where there is a letter i dont know
 
Upvote 0

cadcamman

Member
Licensed User
Longtime User
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
I am trying to write a crossword solver, but i am new to programming and dont know how to handle entering unknown letters into the search string.

To find a word where some letters are missing, I don't know that you can do better than just looking up all words of the same length in your list of words and make an array of words which match the known letters, unless starting or ending letters are known.

If any starting letters are known, that would narrow your search by a lot, assuming your list is an indexed data file.

If you are using an indexed database, you could also add a field for each word in which the word is spelled backwards; that way, if an ending letter is known, that will likewise make the search go faster.

Example: A five-letter word in which only the 3rd and 5th letters are known: "_ _ r _ y". You could search though all 5-letter words, but if you have the words spelled backwards and indexed, you could just search that field for 5-letter words starting with "y". You would find "yrros", "yarra", etc. Add their forward-spelled fields ("sorry", "array", etc.) to an array of possible matches.
 
Upvote 0
Top