title: Divide a group into subgroups of size k
body: <p>I am stuck with one problem :
  Finding all the possible ways of <strong>dividing a group of size 'n' into subgroups of size 'k'</strong>. (here  <strong>n%k =0</strong>)</p>
  
  <p>e.g., let set be {1,2,3,4,5,6} to divide into subgroups of 3 (k = 3,n = 6), possible sets are</p>
  
  <p>a) {1,2,3},{4,5,6}</p>
  
  <p>b) {1,3,5},{2,4,6}</p>
  
  <p>c) {1,3,6},{2,4,5}</p>
  
  <p>d) {1,3,4},{2,5,6} etc....</p>
  
  <p>What i tried doing was, to first find all the combination of size k from the set.
  Then loop through these combinations and find out which all combinations can be grouped together to find the list of subgroups.</p>
  
  <p>But I believe the time complexity is pretty bad in this approach. Is there any better approach for this problem?</p>