Question: We are given two arrays, A and B, containing n positive integers each. You can permute each of the two arrays in any fashion such
We are given two arrays, A and B, containing n positive integers each. You can permute each of the two arrays in any fashion such that after the permutation, we have two permuted arrays A' and B' corresponding to arrays A and B respectively. Give an efficient algorithm to compute the maximum possible value of
(i=1 to n) (A'[i] + B'[i]).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
