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
Your submitted solution is incorrent, it shouldn't have passed. I can't reproduce it now.
You lose some time with the import and use more memory by using by Numpy; also internally np.arrange performs loops and declarations so I don't know if there will be improvements. I would need to test it.
@Goncalerta: I blame the codewars viewer. That being said,
cout
shouldn't work without#include <iostream>
. I suspect hijinks in Codewars' undocumented C++ testing framework.This comment is hidden because it contains spoiler information about the solution
In regard to your question, Moagli, it sounds like you removed the "static" keyword from the race method.
The tests call the "race" method from the Tortoise class itself rather than from any instance, so the method needs to remain static.
e.g.
I see you are new at CW but note that when you ask about your code it is not an issue of the kata but only a problem
in your code so post it as a question. Issues make the author loss points:-(
Moreover you can see that 56 guys passed the kata without any problem.
BTW maybe you should learn more about C++ :-)