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?
Wouldn't the distance change when they drive to a different town?
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?