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
As far as I understand, there's only one acceptable solution and it doesn't actually work for all arrays. I'd prefer for the length requirement to be a bit longer and encourage a more robust solution.
The count includes the function name and you can typically save a char omitting the semicolon from the end
My attempt went through, but the sample tests appeared to be broken for me:
Error: Please pass numbers as strings or BigNumber objects to avoid precision errors.
at Object.toWei
at runTransaction
at /home/codewarrior/index.js:64:1
at /home/codewarrior/index.js:40:4
at Object.handleError
(anonymous function) [as .js]
I refactored this, but Codewars doesn't let you delete solutions unfortunately. I think there could be a cyclical test that this would fail by returning due to a duplicate process instead of ignoring it and moving on.
Thanks, added
Solidity translation added.
This kata is much easier to understand if you reference the Linked List document mentioned, but I think more should be added to the description. "The push function accepts head and data parameters, where head is either a node object or null/None/nil. Your push implementation should be able to create a new linked list/node when head is null/None/nil." At the very least, I would suggest specifying that the expected return of the push function is the head of the new / modified Linked List. Lots of implementations of Linked Lists are object-oriented with functions performing side effects, so this isn't necessarily obvious.
Should be -lt after $i.
There are no tests for PowerShell. It would be nice for the instructions to mention that you should just submit your answer and not try to run the tests if they're not going to be added.
Why have sum be a const and then comp be a function? Couldn't they both be constants?
This comment is hidden because it contains spoiler information about the solution
Echoing Voile, I think the exercise should be changed to avoid functions that return unexpected data types.
Think you might have an issue somewhere in here... a compound like "NH4[Cr(SCN)4(NH3)2]" errors out when I was trying this one on my machine.
Just tried to reproduce and everything seemed to work fine, so maybe it got fixed.
Loading more items...