Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • Without seeing your code it's difficult to tell why it fails. You can try to print inputs and debug your solution locally in your IDE, or share your code so we could take a look.

  • So I pass the tests and pass 4/5 of the attempts. It breaks on the random case way down the line around index 165. Any ideas as to why? Would the size of the array have anything to do with it?

  • @B1ts I did not know that, that information is helpful. @Chrono79 that seems helpful too, I will read!
    Sorry if I came across as venting @XRFXLP, I won't report issues without asking for help first.

    Thanks guys

  • Read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution it contains information about how to debug your code and how to ask for help.

  • You can't change your comment once someone replies to it (no one is blocking it). But you have to understand that saying "I don't understand why it doesn't work" is something that can't be reproduced or tested, and not a kata issue. There's a question label for such problems.

  • I did figure out what I had wrong, it was infinite looping on one particular solution. Sorry for misreporting as issue.

    Thanks for your time!

  • I'm getting timeout error (12000 ms) even though in my machine it executes in 0.0275 ms .

    How do you know that both machines are performing calculation for similar inputs?

    Not an issue, as around 1000 people have competed this in C++

  • I'm getting timeout error (12000 ms) even though in my machine it executes in 0.0275 ms ... (regular intel i5 7th gen)
    I'm a rookie and I am sure there are more efficient ways to code this than mine, but my answer works on all initial tests super fast on my own pc.
    Just don't understand how can it take so many orders of magnitude longer on this server.

    Thanks!
    EDIT: Using C++

  • The sample tests and the attempt's fixed tests are different. Read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#test-attempt

  • Why would the sample tests work/pass for the "TEST" though and not when I "ATTEMPT"?

  • Fixed.

  • Not an issue. If your code doesn't work, it's wrong.

  • I attempted this in Python but am running into an issue. My code appears to work correctly, but I can't get to the SUBMIT step for the kata. When I run the "TEST", the two sample tests pass. Then when I "ATTEMPT" the 100 random tests all pass, but the fixed tests now throw an error (I didn't change the code at all between the TEST and ATTEMPT). I'm trying to figure out if this is an issue with Codewars or with my code. Thanks!

  • Cuz it's not a 2d array, it's just an array(s) in an array.

  • This comment is hidden because it contains spoiler information about the solution

  • Loading more items...