Product of N-1 element permutation in an array.