tiles
and increment the count for each letter.backtrack
that takes the frequency count array and a reference to the result count.backtrack
, iterate over the frequency count array.backtrack
recursively.backtrack
initially with the frequency count array and a result count initialized to 0.