public ArrayList<ArrayList<String>> findLadders(String start, String end, HashSet<String> dict) {
		ArrayList<ArrayList<String>> res = new ArrayList<ArrayList<String>>();
		if(start == null || end == null || dict.size() == 0) return res;
		dict.add(start);
		dict.add(end);
		
		Map<String, Boolean> visited = new HashMap<String, Boolean>();
		for(String str : dict) visited.put(str, false);
		Map<String, List<String>> parents = new HashMap<String, List<String>>();
		Set<String> toVisit = new HashSet<String>();
		int step = 1;
		
		toVisit.add(start);
		parents.put(start, new ArrayList<String>());
		visited.put(start, true);
		while(toVisit.size() > 0) {
			Set<String> newSet = new HashSet<String>();
			for(String str : toVisit) {
				if(str.equals(end)) {
				    String[] words = new String[step];
				    words[0] = end;
					findAllRes(parents, res, step, 1, start, end, words);
					return res;
				}
				newSet.addAll(findNextStrs(str, visited, parents, dict, end));
			}
			for(String str : newSet) visited.put(str, true);
			toVisit = newSet;
			step++;
		}
		return res;
	}