Switch to use the implicit graph when traversing words instead of build a explicit dictionary graph in the beginning, when the dictionary is large and the connected words are limited, this approach will be faster.