Question: Please describe the algorithm in words and pseudocode. You are given as an input two arrays of n distinct natural numbers A = (ai, a2,
Please describe the algorithm in words and pseudocode.
You are given as an input two arrays of n distinct natural numbers A = (ai, a2, ..., an] and B = b1,b2, ..., bn). For each element a; of A, you want to output the element b; of B that is closest to aj, more precisely you want to find b; such that min la; - bkl = la; - bjl. i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
