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.
Actually it is not my tests. It is the node version that the code is running. For some reason I still can't change it. It doesn't matter if I change it to
Node v6.0.0/Babel
, it stills sets toNode v0.10.33
, and this version doesn't allow arrow functions.The error that you are seeing there (
const require = _ => void 0;
) is an internal error of codewars regarding to arrow functions.I'll still try to change it, but don't know if I will be able to.
This proposal is different comparing to other similar katas. I don't think it is a duplicate.
If someone else thinks it is duplicated i will reconsider this.
I don't think this kata should be perfect in this tests you mentioned. If someone else opens a issue like that I will reconsider.
Couldn't reproduce and there is a lack of explanation.
Fixed.
Codewars wasn't allowing me to change the node version to allow arrow functions. And my code was running on an older version (donno why).
It seems to be fixed and I could change it now.
This should be ok now. Let me know if it is solved.
In a chromosome of length ${l}, running enough times it should be able to return all 2^${l} possibilities
In the javascript tests you can see that I don't verify all possible combinations. In 2000 runs I test if the positions have changed at least once somewhere. The l is not fixed as well. Check the javascript test to implement the same test please.
This comment is hidden because it contains spoiler information about the solution
Actually the test is not expecting you to find out all the possibilities inside those combinations, but it checks if each position had permuted between 0 and 1 at least once.
Trying to explain it better:
in a string of length 4 (length is not fixed in this test), in a total of 2000 runs, the position [0] should be
1
in some case but also have to be0
somewhere else:1
0110
110This way I expect you not to have a hardcoded solution, verifying if all your elements inside the string array actually changes.
Which language are you using?
In javascript I can see the following tests for this case:
It is actually a bug related to code wars. I can't set the node version to babel and it doesn't support arrow function as default.
When it gets fixed I update it here.
Thank you for the feedback.
Can you specify the error, please?
Better late than never.
Just accepted. Thanks.
Good catch! thanks
A Quicksum packet allows only uppercase letters and spaces. It always begins and ends with an uppercase letter.
Random test inputs have white space at the end.
A real example that just happened:
My algorithm sees that it doesn't end with
A-Z
and returns0
, but it expects the same result as it was ending withA-Z
.Loading more items...