public static int wordLadder(String start, String end, Set<String> dict) {
        if(start == null || end  == null) {
            return -1;
        }

        if(dict == null) {
            return start.equals(end) ? 0 : -1;
        }

        LinkedList<String> queue = new LinkedList<>();
        Map<String, String> parentMap = new HashMap<>();
        dict.add(end);
        queue.add(start);
        parentMap.put(start, null);

        while(!queue.isEmpty()) {
            String s = queue.removeFirst();
            if(s.equals(end)) {
               String parent = parentMap.get(s);
               int count = 1;
                System.out.println(parent);
               while(parent != null && !parent.equals(start)){
                   count ++;
                   parent = parentMap.get(parent);
                   System.out.println(parent);
               }
               return count;
            }

            for(String word : oneCharApart(s, dict, parentMap)) {
                parentMap.put(word, s);
                queue.add(word);
            }

        }

        return -1;
    }