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.
Thanks, good to know!
This comment is hidden because it contains spoiler information about the solution
This mutates the original array, which was not forbidden by the description, but is probably why this rankes more on the "clever" than on the "best practice" side.
It is really pretty clever though, I have to admit.
Nice solution. Some nitpicks:
sizeof(char)
is by definition always1
, so it's kinda redundant to write that instead of just1
.malloc
,calloc
and friends and null terminate strings.realloc(final, temp - final)
in the end so you don't return a buffer that is longer than it needs to be.In that case it should be changed in the test cases. Either way, the function name in the solution stub should not have to be changed for the tests to pass. Currently you get an error (
error[E0425]: unresolved name 'DNA_strand'
).The Rust code misspells the function name (should be
DNA_strand
instead ofdna_strand
).