private  int help(String start, String end, Set<String> dict, Set<String> visited) { //超时
        int min = Integer.MAX_VALUE;

        for (int j = 0; j < start.length(); ++j) {
            for (int i = 0; i < 26; ++i) {
                if (start.charAt(j) == ('a' + i))
                    continue;
                String newstr = start.substring(0, j) + (char) ('a' + i)
                        + start.substring(j + 1, start.length());
                if (newstr.equals(end))
                    return 1;
                if (dict.contains(newstr) && !visited.contains(newstr)) {
                    visited.add(newstr);
                    int prev = help(newstr, end, dict, visited);
                    if (prev != 0 && prev < min)
                        min = prev + 1;
                    visited.remove(newstr);
                }
            }
        }

        if (min != Integer.MAX_VALUE)
            return min;

        return 0;
    }