Solve 'word ladder' problem in leetcode. Preprocess words in dictionary and make them as a graph and do a BFS to the graph.