public static boolean allStringSetsIdentical(String[ ][ ] sets) {
		// bad case
		if (sets.length == 0)	
			return false;
		
		// use HashMap for O(1) find
		// get the set from the first index
		HashMap<String, Integer> sethm = new HashMap<String, Integer>();
		for (String s : sets[0]) {
			sethm.put(s, 0);
		}
		
		// now with i > 0
		for (int i = 1; i < sets.length; i++) {
			for (String s : sets[i]) {
				// if we missed a key at previous iteration
				// we surely did not have the full set, thus false
				if (!sethm.containsKey(s) || sethm.get(s) < i - 1)
					return false;

				// update with i
				// note: not i++ since we can have duplicates
				sethm.put(s, i);
			}
		}
		
		// we need to check at the last iteration too!
		Set<String> keys = sethm.keySet();
		for (String k : keys) {
			if (sethm.get(k) != sets.length - 1)
				return false;
		}
		
		// if none of these cases break my code, then true
		return true;
	}