title: How to get all possible n-digit numbers that can be formed using given digits?
body: <p>I am coding a part of a big application where I am facing this problem. I will abstract you all from all the details by presenting a similar plain-vanilla scenario.</p>
  
  <p>I am given n (the no. of digits of the number to be formed at run-time).</p>
  
  <p>I am also given a list of numbers say {2,4,8,9}.</p>
  
  <p>I have to form all the possible numbers that can be formed from the above list of the given length.</p>
  
  <p>e.g. if n = 3 and list = {4, 5, 6}</p>
  
  <p>then the possible number are:</p>
  
  <pre><code>444,
  445,
  446,
  454,
  455,
  456,
  464,
  465,
  466, 
  </code></pre>
  
  <p>and so on...</p>
  
  <p>Any help will be appreciated!</p>
  
  <p>regards</p>
  
  <p>shahensha</p>