Skip to content

Latest commit

 

History

History
6 lines (5 loc) · 314 Bytes

README.md

File metadata and controls

6 lines (5 loc) · 314 Bytes

backtracking + trie

For each of the word we can search the whole graph using each node as the starting node to do a backtracking, but this will be very time consuming.
We can build a trie with all the strings that are given.

time: O(all letters in words + (m * n * 3)^L)
space: O(all letters in words)