Ad
  • Custom User Avatar

    Some methods are loop-alike, check that out too.

  • Default User Avatar

    I have the same problem(Python). The maximum test that I can get to is 445, and I don't have any failed tests, that's it. I spent hours to solve this kata and at this moment I have at least 2 different solutions, which are definitely not O(n^2), cause I don't use nested for loops or something like that. However, it has nearly 9000 completions, so maybe it's me and I don't undestand how to optimize my code, but at the same time, I've read many comments and still some people have the same issue.

  • Default User Avatar

    I actually imagined this as more like rocks and a truck that is able to carry a maximum weight and a specified number of rocks. Not all katas have great wording, unfortunately. The problem is still interesting, 'though.

  • Custom User Avatar

    The link was wrong, not the site. If you read the URL, it says solutions/python/me/best_practice. So it's not incorrect that it shows everyone their own solution.

  • Default User Avatar

    When I click on the above link, it directs me to the Python my solutions page for Sum of Pairs which simply shows my one solution ... instead of JakobHeiden's code. Is this a known thing or a some kind of site glitch worth reporting?

  • Custom User Avatar

    Hi,

    That's actually not "cheating" at all. ;) You found some pattern, you used it. Codewars is "TDD oriented". Meaning that as long as you don't bypass the tests (like, really messing with the testing process itself) and your soluiton passes, it's good to go. If you actually used tricks that wouldn't solve any situation, the responsibility is not on you but on the author (ie. not implementing enough tests).

    enjoy your points & cheers. ;)