Skip to content

Instantly share code, notes, and snippets.

@olaugh
Created February 25, 2009 00:50
Show Gist options
  • Save olaugh/69920 to your computer and use it in GitHub Desktop.
Save olaugh/69920 to your computer and use it in GitHub Desktop.
require 'set'
sevens = Set.new
eights = []
for line in open("/home/john/scrabble/twl.txt") do
word = line.strip
if word.size == 7 then
sevens << word
elsif word.size == 8 and /^A/ === word
eights << word
end
end
for eight in eights do
puts eight if sevens.member?(eight[1, 8])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment