|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm attempting to write a program in C in which When given a set of letters the program searches a dictionary of words to find all the words that can be made from those letters and outputs those words. Each letter
can be used at most once and the underscore ("_") can stand for any single letter. For example, given the set of letters aert_ , the words output may include ARE AREa AT ATE EAT mATE RAT RATE REAd TEAR TRAdE TREAd Where blanks are printed in lower case. I thought it would be simple enough, but I'm having problems developing an algorithm that allows for the output of all the word variations. For example, matching the entered characters so that the search allows RATE and TEAR to be output. Any suggestions on how to start? Chris |
|
#2
|
|||
|
|||
|
this can be simply done by
1. taking string length of no the string u'll enter Eg if u enter: arsd_ by using strlen function calculate the string lenght. next step... u need an external file with all these words u wanna find then do a simple search of words and then with simple if else condition u'll manage that... PS: i m presuming that u r good at programming |
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > Help with C program algorithm |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|