(C++) std::next\_permutation

February 24, 2017 · View on GitHub

 

 

 

 

 

(C++) std::next_permutation

 

std::next_permutation is an STL algorithm to obtain the next permutation of a container.

 

 

 

 

 

Examples

 

  • std::next_permutation example 1: basics, uses std::vector its begin and end member functions
  • std::next_permutation example 2: basics, uses std::begin and std::end
  • GetPermutations: obtain all permutations