Google | Pack Words

image

Seems like a variant of Word search -1 and word search -2 but I haven't been able to come up with a better solution than brute force
1- Generate all permutations of the dict.
2 - Apply a generic DFS algorithm on each permutation to see which permutation consumes the max number of words from the dict

  1. return the max words consumed from a permutation.

Any thoughts on a better approach?

Comments (5)