isPermutation