title: Efficient algorithm to print all subsets of length k in an array of n elements
body: <p>This is a very classic problem and most of the solutions I found use the recursion approach like <a href="https://stackoverflow.com/questions/12548312/find-all-subsets-of-length-k-in-an-array">this</a>.  Since there are Cn,k combinations, I was wondering if there exists an algorithm that can print all the combinations in O(n*Cn,k) time. I think the answer given in the link takes more time than this. Also, is there an algorithm that can print the results without using additional space(I mean, without additional space that is dependent on n and k. O(1) is surely OK)? </p>
  
  <p>Thanks.</p>