Ad
  • Custom User Avatar

    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 becomes 31 which is what my solution is providing 🤷

  • Custom User Avatar

    Very smart indeed.