Find Minimum sum of product of two arrays

Given two arrays array_One[] and array_Two[] of same size N. We need to first rearrange the arrays such that the sum of the product of pairs( 1 element from each) is minimum. That is SUM (A[i] * B[i]) for all i is minimum.


This is a companion discussion topic for the original entry at http://iq.opengenus.org/minimum-sum-of-product-of-two-arrays/