package permutation;

public class Permutation {
	

	public static boolean Permutation (int [] t) throws IllegalArgumentException{
		
		if ( t == null ) {
			throw new IllegalArgumentException();
		}
		
		for ( int i = 0 ; i < t.length - 1 ; i++ ) {
			if ( t[i] < 0 || t[i] >= t.length )
				return false;
		for ( int j = i + 1; j < t.length ; j++ ) 
			if ( t[i] == t[j] ) 
				return false;
			
		}
		return true;
	}

}