hi I work with c++ ,can I find easy way for getting 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 if i get 5 or more numbers how to make there's 120 combination