After I have failed finishing the hacker2 brute force challenge, I have decided to try again. But I need some help with the pseudo code of storing all the possibles combination of set of numbers.

For example if the size is 3 the output of the program will be: 000,001,002,...,999.

I cant figure out how to use recursion to count up to 9, adding 1 to the next position and do it again, and again (size times).

Feel free to correct my English as well.

  • I'll just leave a comment to see if it sparks your interest. Have you thought about doing this with de modulo (%) operator? Oct 24, 2016 at 19:34


You must log in to answer this question.

Browse other questions tagged .