Ad
  • Default User Avatar
  • Default User Avatar

    I have done it please take a look

  • Default User Avatar

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

  • Default User Avatar

    You'll have to post your code (marked as a spoiler) if you want better help, but if it works in your local system, there's a good chance that you're mutating the input. Tests 1-3 all use the same array in their function call (as in, the same variable), so if you're mutating it on test 1, you'll have bad answers for tests 2 and 3.

  • Default User Avatar

    My code provides the right output on my system yet it shows test case 2 and 3 failed with expected output [9,6] and showing mine output as [14,10] idk what i am doing wrong