Question: This is a public static function that takes a int[] and int[] for the parameters and returns an int[]. Given two arrays of integers. Your

This is a public static function that takes a int[] and int[] for the parameters and returns an int[].

Given two arrays of integers. Your job is to combine them into a single array and remove any duplicates, finally return the merged array.

Arguments:

int[] array_1 - An array of integers

int[] array_2 - An array of integers

returns int[] - An array of integers containing the unique values from both array_1 and array_2

Example:

array_1 = [1,2,3] array_2 = [2,3,4] output = [1,2,3,4]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!