Function to rearrange the second array such that the sum of its product of same indexed elements from both the arrays is minimized
static int findMinValue ( int [ ] a , int [ ] b ) { int n = a . length ;