Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I think you misread the MDN page : it states that stable sorting is mandatory since version 10 of Javascript (aka EcmaScript 2019). On the same page, it is shown that the first Node version to mandate stable sort() is Node 12.0, which is the latest version that Codewars supports, but which isnt enabled for this particular kata, hence why your solution is failing.

    BTW, please flag your questions as Question instead of Issue which is reserved for problems provoked by the kata itself

  • Custom User Avatar

    Because divsors always exist in pairs, one divisor below the root, and the other one above the root.

  • Custom User Avatar

    But, but, but.... it does

    Given two arrays of strings a1 and a2 return a sorted array r in lexicographical order of the strings of a1 which are substrings of strings of a2.

    Maybe you mean that the ascending part should be specified. AFAIK most sorting implementations do this by default, and if not, should require only a tiny modification to your solution to rectify.

    Not an issue :)