static int rank (int[] N, int key) {
		if (N.length == 0 || N.equals(null)) { 
			throw new IllegalArgumentException("Cannot process empty or null array");
		}
		
		int iterative = rank_iterative(N, key); 
		int recursive = rank_recursive(N, key, N.length - 1, 0);
		assert iterative == recursive;
		
		return iterative;
	}