Ad
  • Custom User Avatar

    I wish this was clearer and mentioned.

    I was wondering if the optimal solution was to return the original array and if such a modification was possible.

  • Custom User Avatar

    a.remove(i) will only remove the first matching element.

    a = [1,2,2] so when b = [2], a will result in [1,2].

    a should result in [1].

  • Custom User Avatar

    Yes! Thank You! I try and forgot delete some peace of code in test-box

  • Custom User Avatar

    This is not readily apparent from the description, but you DO NOT have to return the original array, a. You can instead return a NEW array. Makes possible solutions much simpler.