Consider cases: Since strings in which the same digits appear the same number of times are equivalent, what matters is which digits are used and how often each digit appears in the five-digit string.
- The string contains five different digits: Each digit appears once in the string. There are $$\binom{10}{5}$$ ways to select the digits.
- The string contains four different digits: One digit appears twice and each of the others appears once. There are $10$ ways to select the digit that appears twice and $\binom{9}{3}$ ways to select which three of the remaining digits appear once. Hence, there are $$10\binom{9}{3}$$ such cases.
- The string contains three different digits: Either one digit appears three times and each of the others appears once or two digits appear twice and one digit appears once.
For the first case, there are $10$ ways to pick the digit that appears three times and $\binom{9}{2}$ ways to pick the digits that appear once. For the second case, there are $10$ ways to pick the digit that appears once and $\binom{9}{2}$ ways to pick the digits that appear twice. Hence, there are $$10\binom{9}{2} + 10\binom{9}{2}$$ such cases.
- The string contains two different digits: Either one digit appears four times and the other appears once or one digit appears three times and the other appears twice.
In each of the two cases, there are $10$ ways to pick the number that appears more often in the string and $9$ ways to pick the remaining digit. Hence, there are $$10 \cdot 9 + 10 \cdot 9$$ such cases.
- The string contains one (repeated) digit: There are $10$ ways to choose the digit that occupies each position of the string.
Since the cases are mutually exclusive and exhaustive, the answer can be found by adding the results for the above cases.