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.
why do you open a new issue if there is one already ?
As pointed out by eurydice5717,
Should become:
NOT:
This comment is hidden because it contains spoiler information about the solution
I think that the c++ tests have the wrong values in them. For example, the second test case looks like this:
s = "456899 50 11992 176 272293 163 389128 96 290193 85 52";
e1 = std::make_tuple(13, 9, 85);
e2 = std::make_tuple(14, 3, 176);
e = {e1, e2};
dotest(s, e);
The smallest weight is given by the "50" value at index 1 in the string. It should have weight 5, right? There are three or four of the tests that have this issue.
Also, the syntax of the starting function is incorrect. The namespace qualifier is not required if you're defining the function inside the namespace. It starts as this:
std::vector<std::tuple<int, unsigned int, long long>> Closest::closest(const std::string &strng)
{
// your code
}
It should be:
std::vector<std::tuple<int, unsigned int, long long>> closest(const std::string &strng)
{
// your code
}
The current implementation doesn't build because of this.