Question: 5. (25 points) Given two arrays of the same size, each consisting of n positive integers, write a Java program to determine how many unique

5. (25 points) Given two arrays of the same size, each consisting of n positive integers, write a Java program to determine how many unique integers the second array have. Here a unique integer means that it shows only once in the second array but does not show in the first array. For example, if the first array is 1,5,3, 6, 8 and the second array is (2,4, 2, 5,9] (with 5), the second array has two unique integers (4 and 9 What is the complexity of the program? Measure the runtime of the program for array sizes of 10, 100, 1000 and 10000. Use System.nanoTime() to get time measurements
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
