Skip to main content
edited tags
Link
200_success
  • 145.6k
  • 22
  • 191
  • 481
problem statement
Source Link
Pimgd
  • 22.6k
  • 5
  • 68
  • 144

Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that only one letter can be changed at a time and each intermediate word must exist in the dictionary. For example, given:

start = "hit"
end = "cog"
dict = ["hot","dot","dog","lot","log"]

One shortest transformation is "hit" -> "hot" -> "dot" -> "dog" -> "cog", the program should return its length 5.

Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that only one letter can be changed at a time and each intermediate word must exist in the dictionary. For example, given:

start = "hit"
end = "cog"
dict = ["hot","dot","dog","lot","log"]

One shortest transformation is "hit" -> "hot" -> "dot" -> "dog" -> "cog", the program should return its length 5.

deleted 9 characters in body
Source Link
Jamal
  • 35.2k
  • 13
  • 134
  • 238

FollowingThe following is my implementation of Word Ladder problem, can. Can anybody review the code to compare its efficiency with other solutions. Thank you?

Following is my implementation of Word Ladder problem, can anybody review the code to compare its efficiency with other solutions. Thank you

The following is my implementation of Word Ladder problem. Can anybody review the code to compare its efficiency with other solutions?

edited tags
Link
mjolka
  • 16.3k
  • 2
  • 30
  • 73
Loading
Source Link
amz
  • 33
  • 3
Loading