标签:开始 solution class from 重复 for modal style 而不是
给出两个单词(start和end)和一个字典,找出所有从start到end的最短转换序列。
变换规则如下:
1.每次只能改变一个字母。
2.变换过程中的中间单词必须在字典中出现。
给出数据如下:
start = "hit"
end = "cog"
dict = ["hot","dot","dog","lot","log"]
返回
[
["hit","hot","dot","dog","cog"],
["hit","hot","lot","log","cog"]
]
标签:开始 solution class from 重复 for modal style 而不是
原文地址:https://www.cnblogs.com/phinza/p/9864184.html