Word ladder Top interview question -top Linkedin questions-question 8


why getting runtime error

@dakshi you are implementing brute force recursive approach, try doing it using graphs.
Just imagine strings as nodes and the strings having exactly one letter different are connected by an edge.
Now this just becomes a shortest path problem from source to destination which can be done using BFS.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.