/** // Problem A permutation is a sequence containing each element from 1 to N once, and only once. Write a function: function solution(A); that, given a zero-indexed array A, returns 1 if array A is a permutation and 0 if it is not. // Optimal Solution 1. The easiet way to achieve that is to loop through 1 to N and check if every member is available However, loop is 100% correctness and <20% performance at O(N**2) 2. The Second way is to test if the sum == to expected summation and product == factorial of the array However, this method also has poor performance since facctorial is recursive. 3. The Best solution with 100% correctness and 100% performance is to check the sum and also that the size of the set (number of distinct element of the set) ===length of array */