Ad
  • Custom User Avatar

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

  • Custom User Avatar

    You're right, thank you!

    Will do. I don't think I'm able to change this one's flag now, though.

  • 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

    No random tests and content is not novel.

    Please unpublish this and read available documentation on publishing your first kata.

  • Custom User Avatar

    The input array contains non-negative numbers (not strictly positive).

  • Custom User Avatar

    Okay, didn't know that. Thank you!

  • Custom User Avatar

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

  • Custom User Avatar

    Why is it enough to search for potential divisors of a number up until its square root only? Could someone explain that?

  • Custom User Avatar

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

  • Custom User Avatar

    You're absolutely right. I must have overlooked/completely forgotten about that part of the description when I stumbled upon the error. Sorry!

  • Custom User Avatar

    就是说你的array的长度是2 但是实际上应该是要3 所以你可能要检查下你的编码了 ~~

  • 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 :)

  • Custom User Avatar

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

  • Custom User Avatar

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