Question: Consider two arrays ( the first array and the second array ) of the same size, each consisting of n random positive integers ( each

Consider two arrays (the first array and the second array) of the same size,
each consisting of n random positive integers (each integer between 1 and n).
Write a program to remove duplicates between two arrays. If a positive integer
exists in both arrays, replace it with zero in the second array. And then return
total number of zeros in the second array. In order to receive full points for this
question, show measure of runtime for array sizes of 10,100,1000, and 10000,
as well as, answer the question on the complexity of the program.

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 Programming Questions!