public int ladderLength(String start, String end, HashSet<String> dict) {
		if(!dict.contains(start) || !dict.contains(end)) return 0;
		int result = 1;
		HashSet<String> toCheck = new HashSet<String>();
		Map<String, Boolean> visit = new HashMap<String, Boolean>();
		for(String s : dict) visit.put(s, false);
		
		toCheck.add(start);
		visit.put(start, true);
		while(!toCheck.contains(end) && toCheck.size() > 0){
			result++;
			HashSet<String> newStrs = new HashSet<String>();
			for(String s : toCheck){
				newStrs.addAll(oneDiffStrs(s, dict, visit));
			}
			toCheck = newStrs;
		}
		if(toCheck.contains(end)) return result;
		else return 0;
	}