interesting bfs

Revision en1, by 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. Lang. By When Δ Comment
en2 English Akansha 2019-02-06 21:27:43 539
en1 English Akansha 2018-10-16 04:32:44 660 Initial revision (published)