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.
This comment is hidden because it contains spoiler information about the solution
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.
I didn't know about counter but now I do. Thanks for sharing your brilliant solution!
using static variables for sneaking in dynamic state seems like a poor pattern to use
maybe this could pass a
this
-like struct pointer to the abc() function?could you use a macro to generate function abc?
otherwise, c++ has capturing closures
This comment is hidden because it contains spoiler information about the solution
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!
almost assembly
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
if it looks OK to you ^^
Loading more items...