
please wait
std::vector Vect = {1,2,3,4};
you can simply call std::next_permutation( Vect.begin(), Vect.end() );
to rearrange the elements to their 'next' (lexicographicaly, Google this word if you want to know more about how it works otherwise you can just assume "by magic") permutation. There will be N! (N factorial) permutations where N is the number of elements.
|
|