This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given the word list, count how many words are in the dictionary. | |
# Note: This isn't the most efficient way to do thise. If I was going for | |
# speed, I would have made each dicitonary word the key of a hash, and | |
# had O(n) lookup times. | |
def process_words(words, dictionary) | |
puts "Starting thread #{Thread.current.object_id}\n" | |
found = 0 | |
words.each do |word| | |
if dictionary.include? word |