public int numberOfCombination(int k, int input[][]) {
		if (input == null || input.length == 0) {
			throw new IllegalArgumentException();
		}
		Map<Integer, Integer> t = new HashMap<Integer, Integer>();
		Map<Integer, Integer> t1 = new HashMap<Integer, Integer>();

		for (int i = 0; i < input.length; i++) {
			for (int j = 0; j < input[i].length; j++) {
				if (input[i][j] < 0) {
					continue;
				}
				t1.put(input[i][j], 1);
			}
		}

		for (int x = 1; x < k; x++) {
			for (int i = 0; i < input.length; i++) {
				for (int j = 0; j < input[i].length; j++) {
					if (input[i][j] < 0) {
						continue;
					}
					findNeighborsAndPopulateMap(i, j, input, t, t1);
				}
			}
			copyMap(t, t1);
			t.clear();
		}
		int count = 0;
		for (int i : t1.keySet()) {
			count += t1.get(i);
		}
		return count;
	}
-1 in the input means don't use that position

@param k
@param input
@return
src/com/interview/dynamic/PhoneDialNumberOfCombinationOfSizeK.java