Ad
  • Custom User Avatar

    First off, you made this thing, and it was really cool, and I'm really happy you made it, so thanks! I enjoyed the challenge, so please read the next few sentences in a happy, considerate, soft voice :)

    1. This is 100% not your responsbility, but it seems like a small change to make (changing the number in 2 places) to make it easier on future users, and that seems like an easy win to me.

    2. I understand why you can't change this now, but Makevalley is wrong. The term make valley when snake cased is make_valley (word separator is replaced with underscore) and when camel cased is MakeValley (word boundary is marked by capitalization). So while it makes sense that you can't change it, that's why I found it hard to remember/type.

    3. Me neither, but I thought it was worth mentioning.

  • Custom User Avatar

    Because the object is not just to have the number in the left wing be larger than the equivalent number in the right wing, but also to be as close as possible. So in your example [79, 54, 35, 19, 25, 35] is incorrect because 79 - 35 is larger than 79 - 54, or to put it another way, the largest number in the array should always be on the left outermost, and the second largest should always be on the right outermost, and so on and so forth until you get to the minimum in the middle.

  • Custom User Avatar

    Couple of issues with tests (at least in elixir): If you want to test something like [77] as an input you should make the number larger, outside of the unicode character range, so that in tests you don't get failures like:

    lhs: 77, rhs: 'M'

    That test failure is very unhelpful for begginers in elixir.

    Also, in Elixir, could we please call the module MakeValley as would be convention? Makevalley.make_valley is offputting to type and harder to remember. Also, I was getting an intermittent failure where the minimum was sometimes included twice, but it's unclear why. I believe this was only with the random tests on larger lists.