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 guess the short answer is that your solution doesn't work - some random test cases are generated and you don't pass all of them, but because they're generated randomly, you don't necessarily always fail on the same exact test case.
I like my setup better than yours but I like your math a lot more than I like my own
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The C++ compilation of the test case gives 2 warnings that can be very easily solved if somebody has edit access to the test (both of the variety where int is compared to size_type)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
For the C++ version, I suggest the function signature be changed to either
comp(std::vector<int>, std::vector<int>);
orcomp(std::vector<int> const& , std::vector<int>const &)
- it feels very weird to work with two non-const references that I'm not supposed to modify. For testing purposes, I tried it out with the non-reference version and that passed tests anyway so you wouldn't even have to modify the test data.EDIT: I'm not allowed to delete this reply but it turned out to be in error. Let this edit remain here as a testament to my failure.