Ad
  • Custom User Avatar

    It depends on what you're working on. If this function were part of a website backend counting characters in usernames or something, it doesn't really matter at all. But if this is a helper function that is responsible for comparing billions of base pairs in genetic sequencing or part of a stock trading platform where microseconds matter, then you need to rethink it.

  • Custom User Avatar

    The image displays for me. Is it possible you are blocked from imgur.com somehow?

  • Custom User Avatar

    Kata are rated based on community vote. This kata was published a little over 11 years ago, when the community was very new. The community has gotten more skilled, educational resources have become a lot more accessible, and expectations around coding proficiency have increased over time. You're correct that if this kata were to be rated today, it would likely be voted as a 6-kyu kata, but ranks are very difficult to change and it's not worth going through the long process to do so in 99% of cases. Just be happy with your easy points.

  • Custom User Avatar

    This is not an issue with the kata, your code is mutating the input. Try printing the original input right before you return to see what I mean.

  • Custom User Avatar

    What did you find confusing about the description? I thought it was pretty easy to understand.

  • Custom User Avatar

    You need to return the final value, not print it.

  • Custom User Avatar

    Your own print statement is adding the extra - sign when you're printing to the console, that's why you're seeing double negatives.

    Your code also is not failing on that input, it's failing on a different one. One last thing, the input that you've listed looks like two inputs put together.

  • Custom User Avatar

    In computing, -0 is a valid value. See wikipedia: Signed Zero

  • Custom User Avatar

    The verb variable already includes a space at the end, that's why it's confusing.

  • Custom User Avatar

    Yes, over 100 thousand people have solved this kata. Over 30 thousand of them have done it in python.

  • Custom User Avatar

    Yes, and I'm guessing the mods want to limit this kind of thing in the future.

  • Custom User Avatar

    I don't think it's a problem that a solution for the harder problem also works on the easier one.

    Because people will solve the easy version with a less efficient algorithm, gain access to the solutions page, and then see the solutions of people who solved the easy version with the more efficient algorithm. Then, they can steal that solution and go solve the hard version. It ends up creating more work for the mods to deal with.

  • Custom User Avatar

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

  • Custom User Avatar

    It's difficult to know what's wrong without seeing the input that produced this result or your code. That does appear to be a valid sudoku board. Is it possible that your code is overwriting already solved squares given to you in the input?

    Edit: I see what happened, your result array is rotated. You likely mixed up row and column or x and y somewhere.

  • Custom User Avatar

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

  • Loading more items...