Ad
  • Default User Avatar

    This solution only works if both arrays are the same length. If arr2 is longer, not all numbers are added. If arr2 is shorter, you would get an index out of bounds exception.