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.
Problem Recent Solvers5
Suggested Problems
-
332 Solvers
-
Basic electricity in a dry situation
542 Solvers
-
Back to basics 25 - Valid variable names
316 Solvers
-
Calculate Euler's phi function
83 Solvers
-
Create a vector whose elements depend on the previous element
547 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!