---
title: "Discussion on \"Word Ladder - BFS\" | Hashnode"
description: "Discussion on \"Word Ladder - BFS\". Example 1:\nInput: beginWord = \"hit\", endWord = \"cog\", wordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\",\"cog\"]\nOutput: 5\nExplanation: One shortest transformation sequence is \"hit\" -> \"hot\" -> \"dot\" -> \"dog\" -> cog\", which is 5 words long.\n\nExample 2:\nInput: ..."
url: "https://hashnode.com/posts/word-ladder-bfs/66812bfaa6e78a57ae712114"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Word Ladder - BFS](https://lietcode.hashnode.dev/word-ladder-bfs?utm_source=hashnode&utm_medium=feed)

Example 1: Input: beginWord = "hit", endWord = "cog", wordList = \["hot","dot","dog","lot","log","cog"\] Output: 5 Explanation: One shortest transformation sequence is "hit" -> "hot" -> "dot" -> "dog" -> cog", which is 5 words long. Example 2: Input: ...

Jun 30, 2024 · 3 min read · lietcode.hashnode.dev  
Read the article

-   [#graph-database](https://hashnode.com/tag/graph-database)
-   [#bfs](https://hashnode.com/tag/bfs)

## Written by

[Abhi](https://hashnode.com/@lietcode)

@lietcode

  
[View profile](https://hashnode.com/@lietcode)

Let's crack the interviews

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
