I actually ran into this issue a few weeks back and the most efficient way I could figure out how to solve it was
I found all the subsets of a given string (this will take O(2^n) )
Then I looked at my dictionary to see if the subset "used up" all the characters of all the strings of that size
for example given the string "hetre"
and the words "the, there, her" are in your dictionary
you can calculate all subsets
{h}{e}{t}{r}{e}{he}{ht}{hr}{he}{het}{her}{reh}... there are 32 subsets of "hetre"
then check to see if any of these subsets are similar to the words in the dictionary in this case
reh is similar to her which means that her is a word to be used
This was the most efficient way I could think of
research PowerSets and think of a way you could write the function that "uses up" the strings
Another way would be to brute force it by figuring out the powersets for the strings and finding all permutations, this will destroy performance
Mine didn't give me problems till I started entering strings over 15 characters using the first method
using the second method I didn't get problems till 7