In the way of programming there is some problems on thye basis of finding the permutation. Today I am giving a sample to create all permutations of an string.
// next_permutation
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>
using namespace std;
int main () {
int n,i,l;
char myints[1000];
gets(myints);
l=strlen(myints);
sort (myints,myints+l);
do {
cout << myints<< endl;
} while ( next_permutation (myints,myints+l) );
return 0;
}
That thing is gonna help me A LOOOOT, to find out power sets actually. Very very helpful.