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
This comment is hidden because it contains spoiler information about the solution
Description mentions caching the results, but it is not tested. Either this should be a requirement and hence tested, or should be removed from the description. If you require caching, how should
void
functions be dealt with? The description could benefit from clearer guidelines.Agreed, but I also think that even with those utilities, this task isn't trivial to do correctly. Of course, if you copy everything and turn things into lvalues, it is. But it took me 30 minutes to put together a solution that keeps value categories intact. I assumed there would be tests for that, and also the caching, but apparently not
wow, this is interesting, I didn't thought about that
This comment is hidden because it contains spoiler information about the solution
great kata, thank you, i'm really learned a lot!
nice
这种解法无疑是聪明的,但是可能会造成理解与额外依赖性问题。
hahaha that's "c++" xd
People often upvote the solution they understand or the one similar to what they did, so it's more of the most popular solution rather than most clever or fastest
that's costly
what's the difference between the cbegin and begin, vice versa cend
Really clever way to avoid needing to divide and typecast the result to float/double! And even accounts for yourself being a part of the class 'avg,' though at first glance one might think it doesn't. It does!
nice way to avoid costly division.
Loading more items...