Akansha's blog

By Akansha, history, 4 weeks ago, In English,

can someone help me in this question that how can we solve this thanks in advance.

Given 2 strings str1 and str2. What is the efficient way to navigate from str1 to str2? The constraints are i) a string can be changed to another string by changing only one character. ii) all the intermediate strings must be present in dictionary. If not possible, return “not possible to navigate from str1 to str2″. (pre-processing is allowed and enough memory is available). for example: str1 = feel and str2 = pelt, then the navigation is feel -> fell -> felt -> pelt

 
 
 
 
  • Vote: I like it  
  • -15
  • Vote: I do not like it  

»
4 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

No

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

how can one assure that the intermediate strings are present in any dictionaries ??