Word Ladder (Algorithm and Code Explained) LeetCode 127

preview_player
Показать описание
Word Ladder is a classical BFS based problem. We are given with a word and we need to transform it into a given endWord. We are given with a wordList that acts like a dictionary, all the transformations that take place, should be from this dictionary. In each transformation, we can have only one letter of difference.

It's a very interesting problem. It gets frequently asked at different companies during the coding interview round. If you are preparing for a coding interview, I would highly recommend brushing through this problem and its solution.

I would suggest, getting the gist of the problem from the introduction section of this video, and then try it on your own. See the rest of the video only after you have come up a solution, or you have spent at least half an hour. With that said, let's get ready for the wild ride.

#bfs #leetcode #algorithms

0:00 Word Ladder Problem description
2:13 Example word ladder
3:56 Problem constraints
5:03 Algorithm discussion (BFS)
8:15 JavaScript coding solution
Рекомендации по теме
join shbcf.ru