I want to create a java program that can find the shortest word ladder between two words. It's been suggested that I use a graph data structure with words as nodes. The idea being that nodes with words that are different by only one character are directly connected.
I'm dealing with a text file of possible words that has over 200,000 different words of various lengths. That seems like it would leave me with a great deal of different data structures unless I found some way to connect them.
That's what I'm asking about. How can I connect these separate graphs into one large graph as I add new words to the graph?