Can somebody provide me a link or pseudocode of a function for finding all combinations of k elements out of n? possibly in STL. I don\'t need to compute n choose k, I need
Here is a lazy example of pseudocode that can get the job done...
void nChooseK(array[n],k){ recurse("",array[n],k); } void recurse(initialString,array[n],k){ if(k == 0){ print initialString; return; } for(i=0;i