how can we find out different combination of the elements of an array using c# code. are there any inbuilt library function for this.?
for eg: suppose an array has e
Seemed logic is not absolutely correct as:
var cnk = comb(new[] { 1, 2, 3, 4 }, 3);
This gives 3 variants, but as a matter of fact it is 4:
1 2 3 1 2 4 1 3 4 2 3 4
I guess comb is better to be implemented in recursive way.