Word ladder: Difference between revisions

m
(→‎{{header|Haskell}}: added alternative solution)
m (→‎Breadth-first search: fixed a typo)
Line 259:
=={{header|Haskell}}==
=== Breadth-first search===
FirstThe function first expands a ball around the starting word in the word space of possible words, until it'sthe ball surface containstouches the goal (if possibleever). After that it performs depth-first path-finding from the goal back to the center.
 
<lang haskell>import System.IO (readFile)
Anonymous user