in reply to One for the weekend: challenge
The problem is really a graph-walking problem. Each letter corresponds to a set of vertices. The phone number creates a graph between each set of letters along with the punctuation. Once the graph is created, you walk all the various end-to-end paths (using NextPermute(), for example) and compare the resulting string with the dictionary. Shouldn't take more than 100 lines.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: One for the weekend: challenge
by BrowserUk (Patriarch) on May 31, 2008 at 01:16 UTC |