Welcome back to another awesome week! Today's problem comes to us from @monkbroc
My son has a toy that speaks English words. It has 3 slots for plastic letters. When the slots are full and the letters make up a real word, the toy will read it. The toy comes with 2 of the following letters: D E G M O P, and 1 of each other. So it's possible to spell MOM but not BOB.
Write a program to list all 3 letter words in the English language that can be spelled on that toy.
Most Linux distros come with a built in dictionary or you can find one by searching the internet. Here is one I found for English.
Comments:
Anonymous - 10 years, 4 months ago
My solution in Ruby.
ruby words.rb
reply permalink