Function to return the index i such that the absolute difference between product of elements up to that index and the product of rest of the elements of the array is minimum
int findIndex ( int a [ ] , int n ) {