cpp implementation of subsets
cpp implementation of Combinations