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.
Hello there 👋 !
I am trying to pass this kata (TypeScript) and my solution works for fixed tests but not for random tests which seem broken.
For instance that assertion fails :
Should return '[1,2,11,12,21,26,31,37,44,54,65,66,75,86,93,100,101,104,107,110,130,134,150,151,158,166,167,168,170,177,179,2,11,12,21,158,167,168,177,2,11,12,21,158,167,168,177,2,11,12,21,158,167,168,177]': expected [ Array(31) ] to deeply equal [ Array(55) ]
The description clearly states :
Return array must *not* contain duplicate integers.
The test expects the function to return
[1,2,11,12,21,26,31,37,44,54,65,66,75,86,93,100,101,104,107,110,130,134,150,151,158,166,167,168,170,177,179,2,11,12,21,158,167,168,177,2,11,12,21,158,167,168,177,2,11,12,21,158,167,168,177]
which contains duplicates... when duplicates are filtered out, the array length becomes31
which is what my solution is providing 🤷Very smart indeed.