Find if the members of an given array of integers is a permutation of numbers from 1 to a given integer