Ad
  • Custom User Avatar
    • Input range is too small
    • Needs random tests
  • Custom User Avatar

    A couple of things that would make this kata more fun:

    • Replace your custom AreArraysEqual with the built-in Test.assertSimilar(actual, expected, msg). This provides feedback (outputs the actual arrays), and effectively does the same thing.
    • More tests might be a good idea, especially more tests for impossible inputs (for example, try a long valid input with buzz, buzz somewhere.
    • Since you are only testing a limited set of ranges, you should note this in the instructions. While it's possible to come up with an efficient, general case solution to this problem (handling an arbitrary number of inputs), if you note that you are only concerned with values from 1 to 100 (for example), you'll open this challenge up to more users.
    • On the other hand, if you want to force a general solution, make sure you test a huge input to strain poor solutions (like the range 5...150).