Advertisement
Guest User

Untitled

a guest
Jun 6th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. def find_words
  2. arr = []
  3. this = upcase.split ''
  4. for n in (1..length)
  5. this.permutation(n) do |w|
  6. w = w.join ''
  7. arr << w if WORDS.include? w
  8. end
  9. end
  10. return Set.new(arr)
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement