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.
.
Oh, my fault, thx for help
arr
is not a copy ofnums
it's another reference to the same array.This comment is hidden because it contains spoiler information about the solution
Still, can't see your code.
No, now it's vice versa, only the first test passed and other failed, and length of input array equal 0
Please post your old code, it should work now.
I found another solution which passes the tests. But mutating an array, even if created within the function, will fail one test
Read this: https://docs.codewars.com/training/troubleshooting/#post-discourse I can't see your code otherwise.
You're mutating the input array. It doesn't matter anymore.
Fixed for both Dart and TypeScript.
No, I create new array and work with it. Every time failed only one random test (and always first), other test passed
You're probably mutating the input array. Changed the tests to calculate expected before calling your function.
This comment is hidden because it contains spoiler information about the solution
The 2nd sample test is wrong
Language: Typescript
Loading more items...