This Java programs checks if a given array is a permutation. This programs has an O(n) time complexity.