For choosing M elements from array of size N.

Combinations Complexity: Space

Combinations Complexity: Step Count