Question: HandsOn > 1 : Minimum Difference Pairs You are given two arrays, A and B , of sizes N and M , respectively: Your task

HandsOn >1: Minimum Difference Pairs
You are given two arrays, A and B, of sizes N and M, respectively:
Your task is to find the smallest absolute difference between any element in A and any element in B.
Input Format
The first line contains an integer, N, denoting the number of elements in A.
The next line contains an integer, M, denoting the number of elements in B.
Each line i of the N subsequent lines (where iM1N10??51M10??51A[i]10??50i0i
 HandsOn >1: Minimum Difference Pairs You are given two arrays, A

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!