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.
Lua translation!
when it seems you are doing the right thing and tests says no.
then you make such hard code
and the tests say that they don't care what you return.
That may be subjecive, but given that there are mentions in description of constraints that include arrays of length ~100_000, that in itself should suggest "performance".
please add a performance tag! С++ big_random_tests is impossible to pass without optimization
In JS, if a function doesn't explicitly return a value, it still returns 'undefined' by default. So, a function always returns something.
that link is only there when someone has the right language selected and has already solved/forfeited the kata for that language. Besides, since it fetches the solution of your most recent attempt (regardless of whether it passes or not), it is not reliable.
Anyways, I completely rewrote the C tests suite, it should be OK now (old solutions are still passing, at least the author's)
I did say it was C and there's a link under the comment that says "View Solution" that always changes to the most recently attempted & passing one if it matches the language you selected above. I didn't think to post a direct link but I couldn't have anyway-- the 3 passing attempts on my own list of solved katas don't have the Discuss link, only Refactor, presumably because I didn't Submit. I'm sorry for not starting with the TL;DR: and only getting to it in edits after trying more things I could have tried sooner.
Okay, the tests suite in C is seriously messed up. I have to rewrite it from scratch.
how am i supposed to debug anything with that kind of issue report ? you basically say "my solution was not supposed to pass but passed, there might be something wrong, or maybe not, and i'm not giving a link to my solution" :(
This comment is hidden because it contains spoiler information about the solution
Very nice kata.
This comment is hidden because it contains spoiler information about the solution
thanks
Thanks !
OP solved it, closing. (An additional read on how to write a solution for CW katas --> https://docs.codewars.com/training/training-example)
Loading more items...