Created
July 16, 2013 13:20
-
-
Save patbl/6008624 to your computer and use it in GitHub Desktop.
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
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