Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Permute
//Title of this code #include <iostream> #include <string> using namespace std; // n! factorial void permuteString(string s, int j) { if (j == s.length()) { cout << s << endl; return; } for (int i = j; i < s.length(); ++i) { swap(s[i], s[j]); permuteString(s, j + 1); swap(s[i], s[j]); // swap back } } int main() { permuteString("abcd", 0); }
run
|
edit
|
history
|
help
0
"Mostly invalid states" and unordered_set
Affine Key Finder and Decrypter
Increment pointer to struct
7
thread-destructor
problem_binary_4
#30.1
Error defining lambda inside namespace
template test
CommandQueue