Stokastik

Machine Learning, AI and Programming

Tag: Word Ladder

LeetCode: Word Ladder II

Problem Statement Solution: This is one of the problems asked frequently in coding interviews but has a relatively straighforward solution once one can get hold of the data-structures that he/she is going to implement. The idea is pretty simple, starting from 'beginWord', find out all possible words that are 1-distance away and also in the list of valid words. Repeat this step until we hit the 'endWord'. But since the […]

Continue Reading →