Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
need a third button -->
Successful Hack
Fair call, you're right. Perhaps the tests should be updated for this particular case.
Nice idea, but it doesn't quite work.
Yes, anagrams must have equal sums, but equal sums are not necessarily anagrams.
This passed the example tests because they were inadequate to reveal the error. The following test would fail using your code:
Test.assert_equals(anagrams('add', ['ace', 'dad', 'ebb', 'fab', 'gaa']), ['dad'])
Maurice,
Ahah! You are right. I'm pretty sure I meant to flip that back and compose it with
not
.Either way, really appreciate the comment!
Best,
Jeff
The code is a bit confusing, because the function "isVowel" does return false for a vowel, which true would be expected.
Kind regards,
Maurice