Find shortest transformation steps in a word graph | Amazon Interview Question