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.
I have an assumption that a compiler is likely to optimize the calls to sqrt by making the result a variable in the compiled program anyway. I heard it similarly does this with repeated strlen calls. While it would be good practice to tell the compiler to do that explicitly, it's unlikely to matter in the end anyway, right? And that's besides the question of whether this solution is meant as a code golf solution. Since best practice and code golf are often the antithesis of eachother.
Fixed
fixed by mauro-chabby combo
Good that you wrote it. I had the same problem :D
1 -> 2 -> 3 -> None should equal 1 -> 2 -> 3 -> None
0 -> 1 -> 4 -> 9 -> 16 -> None should equal 0 -> 1 -> 4 -> 9 -> 16 -> None
Oh data type was str, not int -> error message is a bit obscure
Approved, thanks!
One of the most evil? How so? You obviously haven't seen much C code.
Might I suggest studying the results of the IOCCC?
fixed
Approved
approved
approved
approved
approved
well
memmem
is glibc-specific (not in standard C) and it looks for bytes patterns, not array elements, but it will happen to work there because the indices are < 128. you're the judge :PLoading more items...