Skip to content

Instantly share code, notes, and snippets.

@patbl
Created July 16, 2013 13:20
Show Gist options
  • Save patbl/6008624 to your computer and use it in GitHub Desktop.
Save patbl/6008624 to your computer and use it in GitHub Desktop.
require 'test/unit'
def combine_anagrams(words)
end
class TestCombineAnagrams < Test::Unit::TestCase
@input = %w[cars for potatoes racs four scar creams scream]
@output = [ ['cars', 'racs', 'scar'],
['four'],
['for'],
['potatoes'],
['creams', 'scream'] ]
def test_easy_input
assert_equal @output, combine_anagrams(@input)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment