I have been experimenting around to generatewith generating all the n-combinations of an array. Below is theThis code to quickly generategenerates all \$\text{k-combinations}\$ of a given array. I am testing my own implementation because of some restrictions in coding competitions (Alsoalso, knowing the basics never hurts :)).
It seems that my implementation is a lot slower than the library code,. I don't know where I can save time.