Run Code gives 0.
"hit" "cog" ["hot","dot","dog","lot","log"]
how about this
hit hot dot dog log cog
and answer is 5?
My guess is endWord needs to be in the dictionary.
I have the same issue. Now I see why this problem has so many dislikes.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.