Word Unscrambler

Hey guys. Im still a first yr programmer so go easy. For my final my teacher gave us this:

Unscramble the following letters into a phrase using a standard english word list.

[YYY] [YYYYY] [YYYBC] [GHLLLM] [PPPRR] [RS] [SS] [SSTTT].

These are the letters used ^^ and the length of each word is the number of letters found between the brackets.

Not really sure how to go about this. I know how to set up strings in order to call the worldlist and all, however I dont know how to eliminate the words that dont have any of the letters included above and that are too long or too short to fit between each bracket. Additionally, how do I print out only the words that can possibly be used? I would be thankful for any suggestions. All is greatly appreciated.
@aml14

Are you sure those are the correct letters to be used? Except for the 'Y', I see NO vowels, so I don't see how any words could be made. Even the 'Y' is not always a vowel, it only depends on how it's used in a word.
Hi whitnite. I am sure those are the letters used - sucks right. It uses weird words like slyly and gypsy and glyph and my and by but those are the only words i know for sure.
@aml14

Wow, that's sucks for sure. I didn't even think of those words you showed. Did the teacher give you a word list? If not, maybe do a google search for words with no vowels, insert those into a text file, and do compares to your letters, subtracting the letters as you find words using your letters. Looks fun. I may have to give it a try myself.
The word list is your typical 27,000 word english dict. So not much help there. I see what you're saying though ill give it a try.
I think it comes down to searching the dictionary one word at a time, storing possible words for each [....] [...] in the puzzle into arrays or something. Then it's a matter of doing an exhaustive search until all the words together have 11 Y's, 5 S's, etc.
@aml14

I did a google search, and here's the list of words I found, that do not have a vowel.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
my
by
sky
spy
shy
fry
fly
why
dry
try
tryst
gym
hymn
lynx
lynch
myth
wyrm
myrrh
rhythm
rhythms
pygmy
gypsy
flyby
crypt
slyly
nymph
syzygy
spryly
sylphy
symphysy


You can use this list to figure out the unscrambled words. If I find more, which I doubt I will, I'll add to this post.

The sentence, unscrambled, will be..

"Shy gypsy slyly spryly tryst by my crypt"

Finding the answer, using code, is more of a challenge..

Last edited on
Topic archived. No new replies allowed.