LeetCode 212 Word Search II - Why Naive Fails

Why brute force fails

For each word, run Word Search I (DFS from every cell).

With kk words and board of size m×nm × n, each word search takes O(mn4L)O(m \cdot n \cdot 4^L) where LL is word length. Total: O(kmn4L)O(k \cdot m \cdot n \cdot 4^L).

Many words share common prefixes. Can you search for multiple words simultaneously?