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.
Thanks for making this Kata!
I found the instructions to "add one" a bit misleading for this example:
[1,0,0,0]
invert: [0,1,1,1] (= 7)
add 1: [1,1,0,0,0] (= 8)
Maybe include this example and say:
(I'm new to 2's complement, so maybe it's only confusing for people not familiar with it)
@FArekkusu: see the issue above, plz
this sentence in the description makes close to no sense according to the task:
It should be replaced with something like (
hopefully(edit: it does) this will match JS and C# too...?)and at least one fixed tests with a different length should be added (both to test cases and example tests parts)
check the thread just below this
thank you @rowcased. Iam done. What was fixed?
The reference solution has been fixed, so, refresh the page, reset the trainer and try again.
Nice done, thank you @FArekkusu :) (even if this invalidate previous solutions ;P)
Submitted my own solution. All works now.
I have fixed the reference solution. Please, reset the trainer and try again.
@stɛffan153: actually JS random tests produce input of length < 4 and expect result of length 4 :(
I'm totally agree with you... that should be stated in the kata description and better if minimum length 4 is required, expected result of input such as
[ 0, 1, 0 ]
should be[ 1, 1, 1, 0 ]
but not[ 0, 1, 1, 0 ]
as it is actually ^^It doesn't need to be of length 4. It needs to be of whatever length that the array passed in was.
[0,0,1,0] = 2 in base 10
[1,1,0,1] <- Flip the bits
Add 1
[1,1,1,0] = -2
i dont understand this
If you like, you can post your code with proper code markdown, (and don't forget to use the spoiler tag). I'll take a look and debug what I can/should for you.
Loading more items...