prog.cpp:8:7: error: invalid preprocessing directive #Since
# Since all words are of same length.
^~~~~
prog.cpp:11:7: error: invalid preprocessing directive #Dictionary
# Dictionary to hold combination of words that can be formed,
^~~~~~~~~~
prog.cpp:12:7: error: invalid preprocessing directive #from
# from any given word. By changing one letter at a time.
^~~~
prog.cpp:16:15: error: invalid preprocessing directive #Key
# Key is the generic word
^~~
prog.cpp:17:15: error: invalid preprocessing directive #Value
# Value is a list of words which have the same intermediate generic word.
^~~~~
prog.cpp:21:7: error: invalid preprocessing directive #Queue
# Queue for BFS
^~~~~
prog.cpp:23:7: error: invalid preprocessing directive #Visited
# Visited to make sure we don't repeat processing same word.
^~~~~~~
prog.cpp:23:34: warning: missing terminating ' character
# Visited to make sure we don't repeat processing same word.
^
prog.cpp:28:15: error: invalid preprocessing directive #Intermediate
# Intermediate words for current word
^~~~~~~~~~~~
prog.cpp:31:15: error: invalid preprocessing directive #Next
# Next states are all the words which share the same intermediate state.
^~~~
prog.cpp:33:19: error: invalid preprocessing directive #If
# If at any point if we find what we are looking for
^~
prog.cpp:34:19: error: invalid preprocessing directive #i
# i.e. the end word - we can return with the answer.
^
prog.cpp:37:19: error: invalid preprocessing directive #Otherwise
# Otherwise, add it to the BFS Queue. Also mark it visited
^~~~~~~~~
prog.cpp:1:1: error: ‘from’ does not name a type
from collections import defaultdict
^~~~
prog.cpp:25:5: error: expected unqualified-id before ‘while’
while queue:
^~~~~