Problem 45463. Word Ladder
Solution Stats
Problem Comments
-
2 Comments
Hi Asif Newaz,
thx for the problem. I enjoyed to solve it. But in the task i found a missing information. Second Test case provides in the set follwing words 'can','fan','pat'.
In the second iteration when function found pan, all three cases match and i do not see any rule in the description, why it has to be pat. When i follow in the Test Cases the solution, it seems words which differ a single character only at the end of the pattern will get preferred. For my understanding, the current description is not limiting any solution when multiple Hits are detected.
Maybe add an additional requirement, clarifying the rank of matches.
Thx :-).
Multiple solutions may exist for this problem, but the test suite only considers one correct. For instance, in test #2, y = {'mat' 'pat' 'put' 'aut' 'apt' 'ape'}; is a valid path from the word man to the word ape. This means we must use words in the order we find them as a priority queue.
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
3252 Solvers
-
149 Solvers
-
Is this date a palindrome?emordnilap a etad siht sI
59 Solvers
-
Find mistyped words in text (mixed-up letters)
154 Solvers
-
Calculate a modified Levenshtein distance between two strings
111 Solvers
More from this Author165
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!