Ad
  • Default User Avatar

    Thanks for comment! You're right, that solution destroys the order of array1 and it doesn't guard against duplicates in array1 as it should according to requirements.