/ Published in: C
Given a sorted set of digits, print all of them in counting order.
digits[] - the set of digits allowed. They are assumed to be in the set {0-9}, but it will work with larger numbers as well.
range - the length of the resulting number (i.e., how many digits to print)
numDigits - the size of the set of digits represented by digits[]
There are probably slicker ways to do this: see http://stackoverflow.com/questions/228796/algorithm-odometer-brute-force
but this one is fast.
digits[] - the set of digits allowed. They are assumed to be in the set {0-9}, but it will work with larger numbers as well.
range - the length of the resulting number (i.e., how many digits to print)
numDigits - the size of the set of digits represented by digits[]
There are probably slicker ways to do this: see http://stackoverflow.com/questions/228796/algorithm-odometer-brute-force
but this one is fast.