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 line
arr[i] = static_cast(rand() * 1.0 / (static_cast(RAND_MAX) + 1.0) * 21 - 10);
can bestd::uniform_int_distribution⩽int⩾ randomNumber(-9, 10)
. In this case you can rid offctime
header and include the mersenne twister engine with random devicestd::mt19937 mt{ std::random_device{}() }
. The final result would be more convenientarr[i] = randomNumber(mt)
Please remove
using namespace std
from Test Cases/Sample Test CasesWouldn't it be better to write
ExtraMessage("Wrong answer for arr={" + s_arr + "}"
instead ofstring s_arr("Wrong answer for arr={");
Lol, insane, I missed it for Java and now missed it again.
Fixed
That's only the case with test suites like Python, as in those languages the function might be accessible from the solution. (https://docs.codewars.com/languages/python/authoring/#reference-solution)
In Rust you need to declare a function with
pub
to make it accessible from outside, which isn't the case.However, for the sake of encapsulation, I will agree that it would make more sense to have the function as part of the
tests
module.What kind of kata name is "Don't use!"?
I fixed it.
Хорошо
How many tests approx do you want me to do?
you cannot, once any other user solved it. The only thing you can do is to unpublish it. Then the kata will sit in your draft section (...just like it is right now, in fact. So you already did all that you could do)
Yes, it's un publish and similar problem with deleting.
It's Un publish, but similar problem.
How to delete this kata?
duplicated issue. Closing. @LeoVaider: read the docs linked in the message below.
How?
Because
2 * 13 + 1 = 27
Loading more items...