单词接龙

题目一:给出两个单词(start和end)和一个字典,找到从start到end的最短转换序列c++ 每次只能改变一个字母。 变换过程当中的中间单词必须在字典中出现。 例子: 给出数据以下: start = “hit” end = “cog” dict = [“hot”,”dot”,”dog”,”lot”,”log”] 一个最短的变换序列是 “hit” -> “hot” -> “dot” -> “d
相关文章
相关标签/搜索