Ayush7614 / Ayush7614/Daily-Coding-DS-ALGO-Practice

Word Ladder Leetcode Hard

Open
#973 6 comments 0 reactions 1 assignee Claimed by @sardonicankita View on GitHub
LGMSOC21 🟧 Level3
Dominant language
C++
Stars
323
Forks
472
PR merge metrics
No merged PRs in 30d

Description

# Aim

To solve the leetcode hard problem _"Word Ladder"_ in C++.
Given two words, beginWord and endWord, and a dictionary wordList, return the number of words in the shortest transformation sequence from beginWord to endWord, or 0 if no such sequence exists.
Admins please assign this to me under LGM SOC'21.


# Details
A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that:
1. Every adjacent pair of words differs by a single letter.
2. Every si for 1 <= i <= k is in wordList. Note that beginWord does not need to be in wordList.
3. sk == endWord

### Programming language

- [ ] C
- [x] C++
- [x] Java
- [x] Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.