interesting bfs

Правка en1, от Akansha, 2018-10-16 04:32:44

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

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Akansha 2019-02-06 21:27:43 539
en1 Английский Akansha 2018-10-16 04:32:44 660 Initial revision (published)