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 can not diecide between BP & C
This is a task that, like all tasks here, requires you to provide a valid solution, whatever it is. If an author doesn't want some library to be used, it's up to him to make it impossible.
I beleave This is not a task for using standard library from STL. I thnk they wanted us to create our own logic.
This comment is hidden because it contains spoiler information about the solution
This kata is asking you to find the maximum length difference between any two strings within two lists. I don't think this is a spoiler because I just reworded the "pseudo code".
Sorry about that I'm still new to codewars and didn't know what to mark it as.
Yes I did rename the class when I was working on it in eclipse (in hindsight I won't be doing that anymore), but I make sure I don't change anything in the codewars editor and only add code. I retried it with renaming the class and same issue.
Turns out I'm just having server connection issues, tried a few kata I've finished already and I'm having the same connection issue.
Sorry about the confusion, I know better now thanks!
Please do NOT create an issue, if you are not sure there is really a problem with the kata.
You renamed the class... So the tests cannot find your solution.
Rename it back to "Kata" and it should work.
This comment is hidden because it contains spoiler information about the solution
No problem!
Great, that you solved it!
Have a good time on CodeWars!
This comment is hidden because it contains spoiler information about the solution
Ahhhm, NO!
I checked the first 20 C++-Solutions. No one changed the prototype!
Search for another way. It is possible! :-)
It's not the prototype -- you're right. The 306 people most likely changed the values in the test case. I can pass this kata by changing that last test case from
{ 2, 4, 3, -4.5 }
to{ 2, 4, 3, -4 }
.No issue.
306 people solved this kata in C++ without any problem and without changing the prototype. ;-)
You will also solve it. :-)
I think there's a bug using C++:
To get the correct output for the 3rd test cast, the prototype for the averages function needs to be
std::vector<double> averages(std::vector<double> numbers)
notstd::vector<double> averages(std::vector<int> numbers)
.If you make the fix, you get this compilation error:
-isystem /runner/frameworks/cpp error: no matching function for call to 'averages'
std::vector actual = averages(testInput);
^~~~~~~~
note: candidate function not viable: no known conversion from 'vector' to 'vector' for 1st argument
std::vector averages(std::vector numbers)
^
1 error generated.
Edit: Also, the question asks to compute the averages for a list of integers and the third test case has a float/double in the list (from the perspective of c++/c).