I want to generate all possible combinations within a given limit sequentially. For example, For 3digit number, if there are 3^9 possible combinations, is it possible to generate those combinations part by part like

  1. 3^(0-5)-Part one
  2. 3^(6-9)-Part two

Is there any rules/law?

  • 1
    $\begingroup$ Just counting up will generate them: $000$, $001$, $002$, ..., $999$, or is this not what you are after? $\endgroup$ – Joppy Apr 24 '17 at 8:09
  • $\begingroup$ I know it can be generated by counting. But I want to know is there any specific algorithm? $\endgroup$ – user269156 Apr 24 '17 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.