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.
fixed (and added edge cases to fixed part of full tests)
It's ugly but it works? The whole time I was coding this I couldn't shake the feeling that I was missing something that was going to requrie me to rewrite it almost from the ground up... but then, other than some reordering to match the expected order of things, it actually worked, so, uh, no rewrite needed, this ugly code I thought was doomed to be rewritten gets to be put on display!
damned if I know. Just popped back in after a year away from the site, spent tons of time polishing and refining my first kata, and almost as much time after that trying to get it approved. It's still beta, no clue why. Doesn't really matter, I suppose, since I'm not really active on the site anymore - but my frustration was a major reason for that tbh :/
ah, yeah, I forgot to come mark this resolved; thanks
Already approved by someone.
I've forked the go translation to fix the issue here, if someone could approve it?
Don't think you can approve your own, will need to get the original kata creator or someone else with high enough honor to approve it for you.
The original creator hasn't been on since 2015, so probably no point holding your breat there; you can connect to the codewars gitter chat and ask someone there?
yeah, I did that while testing actually. Just a bit of a sanity check. Like I said, this fork is not meant to be accepted/merged - I only published it so you could see what I was tlaking about, and will unpublish it now
About the test cases in the fork: you're calling my solution function instead of your own function, and then everything passes... which is to be expected. Your code is not even called. Only in the sample tests do you call your own code.
About the random thing being equal each run; that is of course by design. If you want to change that, srand() on time.
About your test failing; you can check for yourself what the inputs are and what the output should be. If your code cannot reproduce it, the issue is really with your code.
As for forking, I don't really get your intention. I will have a quick look at it, but don't have the time to fully analyze it. You indicated it shouldn't be accepted, hence I'll reject it.
Actually, I tested everything with
+ EPS
, then I tried to remove it before the final submission and it passed, so I don't know if it would have passed every time or not. I've added it back now.Um... depends on the implementation, there could be many 'edge' cases.
You could simply raise the times from 20 to 100 if you wish o_O
so what you're saying is I should add edge cases like that to the fixed tests? <_< :evil laugh:
It's not slow, just an edge case like
will cause it stuck into an infinite loop
because the initial step is too huge for cases like this.
ok, wow, I knew you guys' solutions were probably slower than mine because of the algorithm you used, but didn't realise just how much slower...
added to the random tests, and you're timing out pretty hard now.
For the record, my solution (which I didn't change) completes with the new set in <600ms, so... yeah.
Loading more items...