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.
True
I didn't see that
But I did improve on the one i forked.
The check for size == 0 is redundant. If the size is zero std::accumulate returns 0 anyway.
I think returning -1 isn't a good practice anymore. In general use std::optional for that.
In this case returning -1 is simply wrong! the sum of an empty vector just isn't -1, also suppose the vector was { 1, 1, -3 } then it's sum would also be -1.
In case of INT/INT division - fractional part is being truncated.
This is the most upvoted "best practices" solution, but is it actually valid? (asking pattern theoriests)
The solution doesn't seem to conform that
I'm happy to hear this! Thanks)
OMG what a kata. Enjoyed it a lot
This comment is hidden because it contains spoiler information about the solution
I love card katas, and all the changes look extremely good and reasonable to me
This nuance is especially something this kata description had to have
Approved
This comment is hidden because it contains spoiler information about the solution
WTH is happening here?
Fun little kata, but as for 2023 it should certainly be downgraded to 8-7kyu
As a casual it was easier to switch to Python than figuring out the JS version...
If it wasn't 2kyu I'd probably solve it faster... I've learnt something new and enjoyed it, but the most of other solutions accepted leave me confused...
This comment is hidden because it contains spoiler information about the solution
Really enjoyed this kata. Idk how I never thought about that
For those who don't know where to start, look up on what thing JS OO is based
Loading more items...