Professional Documents
Culture Documents
PL Assg13
PL Assg13
PL Assg13
Design and implement a program for generating all possible combinations of given
string using
recursion.
#include <bits/stdc++.h>
if (l == r)
cout<<a<<endl;
else
swap(a[l], a[i]);
swap(a[l], a[i]);
int main()
int n = str.size();
permute(str, 0, n-1);
return 0;
}
OUTPUT :