hi I am working with C ++, can I find an easy way to get an array from a set of numbers containing all possible combinations between ex: {1,2,3}
{ {3,1,2},
{1,2,3},
{3,2,1},
{1,3,2},
{2,1,3},
{2,3,1}
};
the problem is, if I get 5 or more numbers, how to make there 120 combinations
source
share