# Can't pass input "a" "c" {"a","b","c"}

• Did I misunderstand the question? Why the expected output is 2? We can just change char 'a' to 'c' in one step. Shouldn't the output be 1?

``````As one shortest transformation is "hit" -> "hot" -> "dot" -> "dog" -> "cog",
return its length 5.
``````

• can you explain how this would work for a, c, [a,b,c]
there is a direct transformation from a->c in 1 step.
is it not the same as hit, hot, {hit, hot ...} and the answer is 1??

• Each intermediate word must exist in the word list

• This post is deleted!

• The begin word and the end word are both counted in the dist. So, if beginWord== endWord, dist ==1, although there is no such test case.

• I have the same question... Can anyone help?

• Just solved: I think the start word itself count as 1. So your length should be start counting at 1 instead of 0

• I still don't see how the answer is 2.

`"a" -> "c"` is 1 step, all words are in the set.

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.