This looks a lot more like a computer programming problem than a math problem.
If the numbers are integers, adding 1 to the integer part of the base-10 logarithm will tell you the number of digits the number has. (Be careful with 0.)
Once you have a list that associates a number of digits with the number, you can categorize by the number of digits.
In short, take a number from your input list, count its digits, then assign it to an output list according to the number of digits it has.
_____
Another way to do this is to sort your numbers, then identify the numbers less than 10 (1-digit), less than 100 (2-digits), less than 1000 (3-digits), and so on.