title: Best recursive algorithm to print out subsets
body: <p>I'm trying to find a good recursive algorithm to print out the subsets of a set.
  For example</p>
  
  <p>size 5: gives <code>the set  {1,2,3,4,5} and the subsets off length 3 gives this output:</code></p>
  
  <pre><code>{5,4,3}
  {5,4,2}
  {5,4,1}
  {5,3,2}
  {5,3,1}
  {5,2,1}
  {4,3,2}
  {4,3,1}
  {4,2,1}
  {3,2,1}
  </code></pre>
  
  <p>I've tried many things but it doesn't work. On the internet all the examples are with sets algorithms but I want to write my own, for learning purposes. </p>
  
  <p>Could someone help me with this?</p>
  
  <p>Kind regards,</p>