World Ladder(Printing multiple paths)

08 Nov 2019

Problem

Given two words (start and end), and a dictionary, find the shortest transformation sequence from start to end, such that:

Only one letter can be changed at a time
Each intermediate word must exist in the dictionary
If there are multiple such sequence of shortest length, return all of them. Refer to the example for more details.

P.S. - Print all possible paths

Note:

All words have the same length.

All words contain only lowercase alphabetic characters.

Practice(return shortest path) - (interviewBit/word-ladder-i)

Practice(print all paths) - (interviewBit/word-ladder-ii)

Code - here

Take note