Skip to content

Instantly share code, notes, and snippets.

View AugustoPedraza's full-sized avatar

Augusto AugustoPedraza

  • San Miguel de Tucumán
View GitHub Profile
# 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