Ad
  • Custom User Avatar

    Not a big deal as long as edge cases for same total sales are tested

  • Custom User Avatar

    Your code does not comply to below

    Note: if multiple products have the same revenue, order them according to their original positions in the input list.

  • Custom User Avatar

    Nope, that is the assertion messages, whereby the LHS array indicates your output whilst the RHS indicates the correct one (expected).

    Not a kata issue though, your code does not comply to below

    Note: if multiple products have the same revenue, order them according to their original positions in the input list.

  • Custom User Avatar

    Not a kata issue, your code does not comply to below

    Note: if multiple products have the same revenue, order them according to their original positions in the input list.

  • Custom User Avatar

    Not a kata issue, your code does not comply to below

    Note: if multiple products have the same revenue, order them according to their original positions in the input list.

  • Default User Avatar

    Good Kata, nice work! I think updating the Node version would be a good idea. The JS sort method has been stable since 2019 and that should be reflected in the Kata.

  • Custom User Avatar

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

  • Default 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

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    I think sorting is too costly for this problem. Am I wrong?

  • Default User Avatar

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

  • Custom User Avatar

    No reason behind. But Javascript does have a Issue with the sorting algorithm if revenue is the same. so we included it into the Testcases.

  • Custom User Avatar

    @fnbro why make up new fixed tests cases rather than use the same ones from the Python translation? There's no point in test suite disparity between the two languages.

  • Loading more items...