Question: Write a method union ( int [ ] a , int [ ] b ) that returns an array that is the union of the
Write a method unionint a int b that returns an array that is the union of the elements in the two arrays. You may assume that the input arrays a and b are always given as sorted arrays increasing order The union of the elements is all of the elements from both arrays without any duplicates. The resulting array should also be in sorted order. Examples: Input: a b Output: Input: a b Output:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
