title: Given a dictionary and a list of letters find all valid words that can be built with the letters
body: <p>The brute force way can solve the problem in O(n!), basically calculating all the permutations and checking the results in a dictionary. I am looking for ways to improve the complexity. I can think of building a tree out of the dictionary but still checking all letters permutations is O(n!). Are there better ways to solve this problem? </p>
  
  <p>Letters can have duplicates. </p>
  
  <p>The api for the function looks like this: <br/></p>
  
  <pre><code>List&lt;String&gt; findValidWords(Dict dict, char letters[])
  </code></pre>