Word ladder: Difference between revisions
Content deleted Content added
m remove unneeded check |
|||
Line 49: | Line 49: | ||
for j in 1:length(s), c in 'a':'z' |
for j in 1:length(s), c in 'a':'z' |
||
w = s[1:j-1] * c * s[j+1:end] |
w = s[1:j-1] * c * s[j+1:end] |
||
if w in dict |
if w in dict && !(w in tried) |
||
push!(newworking, [arr; w]) |
push!(newworking, [arr; w]) |
||
end |
end |