Hacker News new | ask | show | jobs
by stevebot 4109 days ago
You have the additional requirement that you change one character at a time, and end up building a graph of neighbors and doing BFS on it.
1 comments

I've never heard this question before, but I assume it's finding words with the lowest Levenshtein distance between wordA and wordB and then wayfinding the route from wordA to WordB using the least steps possible?
correct, I think it is actually a good interview problem for discussion and don't mind it. What I do mind is the attitude of some of my colleagues that if a candidate can't immediately jump to the optimal answer, then they are a pass.
Can you englihten me on how edit distance helps here? I don't see why insert/remove/move is relevant in this case.
Sounds like something I'd likely fail. Without putting pen to paper, I can get from taking the two words and expanding Lev distances until we find a word in common, and then mapping a a route from A to that word, then from that word to B, but whatever I wrote would probably be horribly inefficient, at best.

I would also wager that whomever was asking that sort of question would probably be looking for some optimal form of the answer, and having never encountered it, oh well.