Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def find_words
- arr = []
- this = upcase.split ''
- for n in (1..length)
- this.permutation(n) do |w|
- w = w.join ''
- arr << w if WORDS.include? w
- end
- end
- return Set.new(arr)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement