/*A recursive function to compute all the permutations of a set of numbers of size n */ #include void swap(int a[],int x,int y) { int temp; temp=a[x]; a[x]=a[y]; a[y]=temp; } void permute(int a[],int f,int n) { int i,j,k; //Terminating condition : till the last 2 variables of the arrays are swapped if(n-f>1) { //loop that brings all integers to the first position in the array for(j=0;j