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.
Please, C translation
in this kata the needle is a string constant,
"needle"
. this is why the function only takes one parameter, the array in which to search.added a test to invalidate those solutions
done (
new String("needle")
is enough to create a distinct object)done
to reject
fixed
thanks for your efforts !
it doesnt matter what the code is, there is something wrong with the Nim version. I've played with it a bit and it seems like assertions cannot be wrapped in a function, it makes them automatically succeed for some reason, but when the tests finish it spits out the error message from the OP. not sure what is going on, i dont know Nim
C translation
thanks !
approved
approved
no answer, closing
the input is an array of pointers to
const char
. it is not an array ofconst
pointers, so you can modify it. the function returnsvoid
because you are supposed to mutate the array in-place instead of returning a brand new arrayLoading more items...