You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used Python 3.5.4 for the assignment. My solution is breadth first search. This method searches for the goal word at every level of the tree and then returns the previous nodes till the start word.
To easily traverse through the word file, I have used a hashing function where I denote each word with a hash value. This reduces the time to search
for a word. Also, only those words with the same letters/characters but with different order of characters have the same hash value.
I find the connecting nodes for a word using the function children() function. This connects each word to all words that can be obtained by adding a letter