TITLE: Number of $11-$digit length number with all $10$ digits and no consecutive same digits
QUESTION [6 upvotes]: Here is the question:
In how many ways we can construct a $11-$digit long string that contains all $10$ digits without $2$ consecutive same digits.
Initially, I came up with $10!9$. I thought that there are $10!$ ways to construct $10-$digit number with all $10$ digits. And I can add one more digit at the end of each number in $9$ ways.
However, I found that may wrong. Because I when applied the same rule to $4-$ digit number with $3$ digits $(0,1,2)$, the answer is not $3!2$. For example, it doesn't contain $1210, 2120, 0102, ...$
So how to approach this problem?

REPLY [3 votes]: You have to repeat exactly one digit.
So, first choose the digit that you repeat (how many possibilities?), then choose where those two digits go in the number (how many possibilities?), and finally choose the order for the remaining $9$ digits (how many possibilities?)
(The answer is $163,296,000$.)