title: How do I write a recursive algorithm for permutations?
body: <p>my question concerns a recursive way to output permutations given an input of integers.
  Each of the integers represents a set of letters like a phone's keypad.</p>
  
  <p>So the sets would look like:</p>
  
  <pre><code>1: {}
  2: {"A", "B", "C"}
  3: {"D", "E", "F"}
  4: {"G", "H", "I"}
  etc...
  </code></pre>
  
  <p>I need to produce code that given a series of numbers would output all permutations of the letters.</p>
  
  <p>So, an input of 123 would output:
  AD, AE, AF, BD, BF, CD, CE, CF</p>
  
  <p>Psuedo-code would be preferred, and I'm only somewhat fluent in Java, but any help would be welcome.</p>
  
  <p>Please feel free to give feedback on how this question was asked, I'm still not sure how to post here properly yet.</p>