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.
The button does not work well. To see your code, I have to a) know the language you are training with, and b) complete the kata in the same language . So no, just clicking the "View solution" button will usually not show me your code.
Oh, very good. It failed, expected 7 submitted 8. And I see where my code is wrong, too. And it really wouldn't happen very often in random test cases.
I've re-submitted my code with correction, and will be marking this resolved, but think that it should be added to the edge cases to have it come up each time and not just randomly during that test phase.
This solution is not 100% good, since it fails on some edge cases that only popped up occasionally during the Attempts, and I was unable to debug because of the inconsistency of them showing up.
This has been corrected in my second submission.
Try this test:
@hobovsky: you should be able to see my submitted "solution" by clicking the 'View Solution' underneath my comment.
I'm just wondering if it couldn't come from how I handle 0.
C fork
Thought 1: tests are inconsistent and have to be fixed to make your solution fail every time.
Thought 2: I have no idea what your solution is, so I do not know what to fix.
Approved, thanks!
Node 18 support
My C solution could pass or fail the random tests, without being modified between attempts. Thoughts?
you shouldnt codde like this, lisibility comes first.
Is there any benefit when using a nested ternary operator?
I'm having an STRERR message when I attempt to run my code (tests run fine):
free(): invalid next size (fast)
I believe there may be an error in the line for the C tests, for strin="nine", n=9.
I'm getting the following strerr message when I attempt my C code (tests run fine):
free(): invalid next size (fast)
I believe there is an issue with the C test code, as I use a calloc, and it works fine in the preceding cases. It seems to fail on the test strin="nine", n=9.
This comment is hidden because it contains spoiler information about the solution