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.
good point
Does not compile even with solution. C++
ok
Where does it say i have to return -2 if k and n are equal?
Please fix the c version
Its in C
Getting a 0 as Input
If the string isn't contained in any of the strings in the array, not only do you have to add "None" but the pResultCounter has to be increased. This is also not in the description
you also have to increase the counter, even if there is no match.
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 optional parameter was not really clarified but yea that was it...
Please fix
The testcase is causing an error:
STDERR:
main.cpp:85:18: error: no matching function for call to 'orArrays'
Assert::That(orArrays(V{1,2,3},V{1,2,3},3), Equals(V{1,2,3}));
^~~~~~~~
main.cpp:7:18: note: candidate function not viable: requires 2 arguments, but 3 were provided
std::vector orArrays(const std::vector& arr1, const std::vector& arr2){
^
main.cpp:97:22: error: no matching function for call to 'orArrays'
Assert::That(orArrays(arr1, arr2, def), Equals(sol(arr1, arr2, def)));
^~~~~~~~
main.cpp:7:18: note: candidate function not viable: requires 2 arguments, but 3 were provided
std::vector orArrays(const std::vector& arr1, const std::vector& arr2){
^
2 errors generated.