R********n 发帖数: 3601 | 1 前面不说了。技术问题:
Given a source word, a target word, and a dictionary, how to transform the
source word into target word by changing only one letter in each step. The
word you get in each step must be in the dictionary.
一些数,不知道有多少个。你的内存有限。要你读完这些数之后立刻以相同几率选出一个。 | U*****R 发帖数: 60 | 2 Can I convert the dictionary into a graph: nodes are words and there is one
edge between two words if there is only one different char between them.
The question will be like: given a source node, find a path from it to
destination node.
The whole graph may be sparse so that it can be loaded into memory totally. |
|