I have to find out number of integers that have every digit $(0-9)$ in it where integer starting with zero doesn't count i.e leading zero shouldn't be there. So this makes the length of an integer $ \ge 10$.
For eg - for $10$ length $1234567890,9876543201,4567891023$ and so on
For 11 length = $12345678900, 12345678009$ and so on..
For $19$ length =$1122334556677889900,99887766554433220011$ and so on..
Now given a range $L,R$ I need to find out how many such integers falls in between them. Now I was trying out all combinations and checking if it lies within range. Is there a way to apply permutation and combination to do so efficiently and smartly ?
Suppose you have $a_0, a_1, a_2,..., a_9$. You need to count how many number in $[L,R]$ have exactly $a_0$ 0's, $a_1$ 1's ...., $a_9$ 9's .. Can you solve this? -______- – Rezwan Arefin Apr 11 '17 at 12:29