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
Impressive.
it's so fast
thanks a lot!
It is called a fold expression
could you please name the topic to read because this looks like some msExcel magic to me? I mean this part: (xs + ...)
The tests are not adequate.
These additional things should also be tested:
std::find
(onlystd::vector
andstd::set
is being tested).find
andstd::find
(the former should be used instead of latter)how to check this?
While this solution might look cleaner it has an O(nlog(n)) time complexity in the best case.
This could easy have an linear time complexity using a hash-map.
Tests should be added against this: https://www.codewars.com/kata/reviews/58617cfcc129d2e704000dbc/groups/5acd32cec7309c65cb0038f5
hard as hell if you don't know templates that well, like me
@sv90 are you going to address this issue somehow? If not, I think I'll open an issue on CW github, so that the community can decide what do with these 2 katas (unless somebody comes up with a reason why none of them should be approved at all - in fact, these katas might become obsolete with the introduction of C++20 support on CW in the future, so this case is quite possible too).
This solution should be blocked as well, it's bypassing the
sizeof
check.This solution shouldn't pass, but it currently passes (sometimes, since it takes almost 12s to run), which means test case sizes need to be increased.
Awesome, I checked your code, Time: 3963ms, damn)
My code time is 11 sec XD
Loading more items...