Mega Code Archive
Categories
/
C++ Tutorial
/
STL Algorithms Helper
All permutations of ABC by use of prev_permutation()
#include
#include
#include
using namespace std; int main() { vector
v; unsigned i; for(i=0; i<3; i++) v.push_back('A'+i); prev_permutation(v.begin(), v.end()); do { for(i=0; i