in reply to Re^4: Challenge: 8 Letters, Most Words
in thread Challenge: 8 Letters, Most Words
choroba,
I am bleary eye tired but I wanted to review your code because you mentioned it didn't consider all combinations - only possible combinations.
I am bleary eye tired but I wanted to review your code because you mentioned it didn't consider all combinations - only possible combinations.
If I have understood what you have done, this is not guaranteed to produce the correct answer on all dictionary files. It happens to get the right answer for 2of12inf.txt however. You appear to only be considering the combinations of letters of individual words rather than considering taking some from one word and some from another. Consider the following dictionary:
The obvious answer is 'abcdefgh' which will get 10 words but your code chooses both 'abcdxy' and 'efghlm' with 6 words each.abcd acdb adbc dabc bcad efgh fgeh hegf egfh fegh abcdxy efghlm
Cheers - L~R
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Challenge: 8 Letters, Most Words
by choroba (Cardinal) on Oct 05, 2013 at 07:27 UTC | |
by choroba (Cardinal) on Oct 05, 2013 at 08:22 UTC | |
by choroba (Cardinal) on Oct 05, 2013 at 11:28 UTC |
In Section
Seekers of Perl Wisdom