Question: There are 2 unordered array in the form of X [1..n] and Y [1..m], which are different from each other. Write an algorithm that

There are 2 unordered array in the form of ( mathrm{X}[1 . . mathrm{n}] ) and ( mathrm{Y}[1 . . mathrm{m}] ), which a 

There are 2 unordered array in the form of X [1..n] and Y [1..m], which are different from each other. Write an algorithm that finds all elements in array X that are not in array Y at 0(mlogm+nlogm) time. Assume that all the elements in X are different. You can use known algorithms inside your algorithm.

Step by Step Solution

3.46 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

here is the solution this will provide you with a array of elements that are common in bo... View full answer

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 Computer Network Questions!