¿Esta es tu empresa?
Coding problem on Collabedit: Find an algorithm to find a word ladder between 2 words by changing just one letter at a time. All the words formed should be valid dictionary words. Eg. FOOL ->POOL->POLL->POLE->PALE->SALE->SAGE COLD → CORD → CARD → WARD → WARM
Anónimo
I worked on pseudo code for a while, explaining as I went along. The interviewer was calmly listening. Worked thru couple of logic tries and came to one that I felt would work. I never came across this before, but reading it felt more like a Tree and DFS or BFS problem. I told the interviewer I did not have experience with them even though I think it can be solved by them more efficiently. I basically looped thru all the characters in the first word and another inner loop over all alphabets and when the change is more than 1 letter, I discard otherwise I add to a list and so on.