Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Some methods are loop-alike, check that out too.
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.
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.
Wouldn't the distance change when they drive to a different town?
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.When I click on the above link, it directs me to the Python
my solutions
page forSum 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?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. ;)
This is weird. I'm quite sure I got an O(n) solution. Still I cannot pass an attempt, and no matter how I do the algorithm, it always seems to time out at test 443, which seems to be just a run-of-the-mill short input test. The large n inputs only start at 511 from what I can tell. If I circumvent the large input with dummy results, it does not get stuck at 443. What's going on here? edit: actually I do some sorting, so my solution is at least O(n log n) I guess...
I cheated on a certain kata. I was stumped as to how to solve it, so I tried to coax the system for some information about what test case was killing my solution. In the process I found a pattern in the test cases, which I abused to write a bogus function that would satisfy the test cases but not solve the problem.
Here it is: https://www.codewars.com/kata/54d81488b981293527000c8f/solutions/python/me/best_practice
What should I do now?
This comment is hidden because it contains spoiler information about the solution
Edit: nevermind
This comment is hidden because it contains spoiler information about the solution
If this is easily 5Kyu, why is it marked as 6Kyu?