Ad
  • Custom User Avatar

    If there were no rules on the input, then that's probably a good idea. However, the description of the kata clearly states that the input will always be a non-begative integer, so the extra defensive code is unnecessary in this situation.

  • Custom User Avatar

    Yeah. It was in coffeescript when I was completing it. I'm not sure if it's fixed now, but it definitely caused some frustration at the time.

  • Custom User Avatar

    You have a function preloaded with user tests predefined, yet your submission tests are a diferent function.

  • Custom User Avatar

    The reduce function just takes a collection of values and returns a single value out the end, depending on the function you provide on the inside. In a nut shell, it starts out with what the answer should be, and subtracts the values that are given. In then end, the missing value is what is popped out the other end of the reduce.

  • Custom User Avatar

    There were a few problems I had with this kata. Firstly, I didn't like having to go find the mottos of the houses. It wasn't difficult, but I expect a kata to be pretty self contained so I can focus on the concepts. Secondly, it would be nice if there was a message explaining why a test case failed or show the expected result. Overall it was good though. A very nice intro.

  • Custom User Avatar

    I spent like 15 mintues working on this kata before I found out that codewars doesn't support the ** operator.