Given two words (start and end),and a dictionary, find all shortest transformation sequence(s) from start toend,such that:1.Only one letter can be changed at a time2.Each intermediate word must exist in thedictionaryFor example,Given:start = "hit"end = "cog"dict =["hot","dot","dog","lot","log"]Return:[["hit","hot","dot","dog","cog"],["hit","hot","lot","log","cog"Note:·All words have the same length.·All words contain only lowercasealphabetic characters. |
|
|
|
|
共 2 个关于本帖的回复 最后回复于 2013-7-30 13:14