Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    The tests are intentionally created to time out if the solution is "less optimal". While your solution would work fine in general it need some speed improvements :)

  • Custom User Avatar

    I found the description somewhat baffling at first, but by playing around with the tests and looking at the wikipedia article, it all fell into place bit by bit.
    I also had a timing out issue that didn't go away after correcting an obvious bug, yet went away mysteriously shortly afterwards, after (supposedly) cosmetic cleaning of my code.

    Oh, and I very much enjoyed this kata :)

  • Custom User Avatar

    I found the kata's description to be well specified as a whole, but I could see a couple places that could be clearer. Maybe the first line could mention that it should create a new image where each pixel is modified by its neighbors values using a weight matrix? Something like "Process the given image data into a new image by modifying each pixel by its neighbors values using the given weight matrix." The section about the weights matrix should also indicate what kind of values it contains (i.e., is it decimal multipliers or whole numbers that need to be normalized?). I don't think you need to explain exactly how to combine the weights matrix and image data though, since the Wikipedia entry is pretty helpful in explaining kernels.

    .blue, could you be more specific about which parts of the description are vague? Did you look at the linked Wikipedia article?

  • Custom User Avatar

    The description isn't vague, you might just not understand it. Try to train on easier katas first to gain more experience and then challenge yourself again on this hard kata when you are ready for it.

  • Custom User Avatar

    What is vague?

  • Custom User Avatar

    I've modified the Kata. The peopleInvited parameter is now required to solve the problem. Thanks for the feedback

  • Custom User Avatar

    I feel pretty silly now lol. I'll modify it in a sec

  • Custom User Avatar

    The callback should be called once for each actual match with all of the aforementioned arguments passed in to it.

  • Custom User Avatar

    The callback should receive the following arguments:

    • The matched string.
    • Then, if there are any groups in the regular expression, each group's value should be passed in.
    • Then the index for the first character in the matched string.
    • Then the original input string.