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.
Awesome use of the REX prefix! Nice way to use NOP to form UTF8.
This was quite a challenge to pass all tests with distorted inputs. Took more time than expected. Really nice kata!
Wow! No need to get personal here about my translations. I did use pointers you say? No way!
I've always responded to issues raised about my translations, and I keep things clear for the end-user. That was what this comment is about.
If you can't handle criticism about how to improve upon such a simple thing, especially for more inexperienced users, you have bigger issues to deal with.
Relax man.
Before I erase the code, I read it, thank you.
It doesn't explain it as you claim:
A quick read shows that array length is n. You mean something different, which took some time to discover. Please be a bit more clear. Also it's missing from the Description, which says:
Clearly the function
off
doesn't return an array at all, so the description is inaccurate.I don't care too much about "preferred way", as I've written plenty of C translations where I adapted the description for C specifics. There's not much that leads to "maintenance issues" with that.
Other than that, thanks for your efforts.
Brute force solutions like this really should not pass a yellow.
Tests need significant hardening.
Once again, you erase the instructions in the initial code without reading them, stop doing that. Per-language instructions are supposed to be in there on Codewars, as putting them in the description leads to maintenance issues. This is the preferred way to do this and has been for quite some years now, get used to it.
The API is not strange. You have a buffer of length
n
, write your answer to it and return the actual length of your answer (which will obviously be<= n
as per the problem statement, since you are removing elements in a list of numbers from1
ton
). All of this is explained in the initial code.C translation has really strange API and expected return value is not mentioned in the description, and is the same as input parameter n??
delete...
delete...
delete...
in C: random tests don't excite all paths in solution, allowing incorrect code to pass all tests.
Some cases not covered by default:
but others might also be missing. You can try to find them by running tests 10+ times.
fixed
duplicate of this issue
Fixed Coffeescript and Ruby too.
Loading more items...