You are talking about the test case with "a","c" and wordList[a,b,c] right?
Since It's "a"->"c". The length is 2.
Because the question is asking for the length of shortest path, not the steps taken in the path.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.